Struct chain_impl_mockchain::certificate::pool::PoolRegistration
source · pub struct PoolRegistration {
pub serial: u128,
pub start_validity: TimeOffsetSeconds,
pub permissions: PoolPermissions,
pub owners: Vec<PublicKey<Ed25519>>,
pub operators: Box<[PublicKey<Ed25519>]>,
pub rewards: TaxType,
pub reward_account: Option<AccountIdentifier>,
pub keys: GenesisPraosLeader,
}
Expand description
Pool information
Fields§
§serial: u128
A random value, for user purpose similar to a UUID. it may not be unique over a blockchain, so shouldn’t be used a unique identifier
start_validity: TimeOffsetSeconds
Beginning of validity for this pool, this is used to keep track of the period of the expected key and the expiry
permissions: PoolPermissions
Permission system for this pool
- Management threshold for owners, this need to be <= #owners and > 0.
owners: Vec<PublicKey<Ed25519>>
Owners of this pool
operators: Box<[PublicKey<Ed25519>]>
Operators of this pool
rewards: TaxType
Rewarding
reward_account: Option<AccountIdentifier>
Reward account
keys: GenesisPraosLeader
Genesis Praos keys
Implementations§
source§impl PoolRegistration
impl PoolRegistration
pub fn serialize_in(&self, bb: ByteBuilder<Self>) -> ByteBuilder<Self>
pub fn serialize(&self) -> ByteArray<Self>
pub fn to_id(&self) -> PoolId
pub fn management_threshold(&self) -> u8
Trait Implementations§
source§impl Arbitrary for PoolRegistration
impl Arbitrary for PoolRegistration
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = BoxedStrategy<PoolRegistration>
type Strategy = BoxedStrategy<PoolRegistration>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
source§impl Arbitrary for PoolRegistration
impl Arbitrary for PoolRegistration
source§impl Clone for PoolRegistration
impl Clone for PoolRegistration
source§fn clone(&self) -> PoolRegistration
fn clone(&self) -> PoolRegistration
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PoolRegistration
impl Debug for PoolRegistration
source§impl DeserializeFromSlice for PoolRegistration
impl DeserializeFromSlice for PoolRegistration
fn deserialize_from_slice(codec: &mut Codec<&[u8]>) -> Result<Self, ReadError>
fn deserialize_validate_from_slice( codec: &mut Codec<&[u8]> ) -> Result<(), ReadError>
source§impl From<PoolRegistration> for Certificate
impl From<PoolRegistration> for Certificate
source§fn from(cert: PoolRegistration) -> Certificate
fn from(cert: PoolRegistration) -> Certificate
Converts to this type from the input type.
source§impl PartialEq<PoolRegistration> for PoolRegistration
impl PartialEq<PoolRegistration> for PoolRegistration
source§fn eq(&self, other: &PoolRegistration) -> bool
fn eq(&self, other: &PoolRegistration) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Payload for PoolRegistration
impl Payload for PoolRegistration
const HAS_DATA: bool = true
const HAS_AUTH: bool = true
type Auth = PoolSignature
fn payload_data(&self) -> PayloadData<Self>
fn payload_auth_data(auth: &Self::Auth) -> PayloadAuthData<Self>
fn payload_to_certificate_slice( p: PayloadSlice<'_, Self> ) -> Option<CertificateSlice<'_>>
source§impl Serialize for PoolRegistration
impl Serialize for PoolRegistration
impl Eq for PoolRegistration
impl StructuralEq for PoolRegistration
impl StructuralPartialEq for PoolRegistration
Auto Trait Implementations§
impl RefUnwindSafe for PoolRegistration
impl Send for PoolRegistration
impl Sync for PoolRegistration
impl Unpin for PoolRegistration
impl UnwindSafe for PoolRegistration
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more