Struct casper_types::system::auction::EraInfo
source · pub struct EraInfo { /* private fields */ }
Expand description
Auction metadata. Intended to be recorded at each era.
Implementations§
source§impl EraInfo
impl EraInfo
sourcepub fn seigniorage_allocations(&self) -> &Vec<SeigniorageAllocation>
pub fn seigniorage_allocations(&self) -> &Vec<SeigniorageAllocation>
Returns a reference to the seigniorage allocations collection
sourcepub fn seigniorage_allocations_mut(&mut self) -> &mut Vec<SeigniorageAllocation>
pub fn seigniorage_allocations_mut(&mut self) -> &mut Vec<SeigniorageAllocation>
Returns a mutable reference to the seigniorage allocations collection
sourcepub fn select(
&self,
public_key: PublicKey
) -> impl Iterator<Item = &SeigniorageAllocation>
pub fn select( &self, public_key: PublicKey ) -> impl Iterator<Item = &SeigniorageAllocation>
Returns all seigniorage allocations that match the provided public key using the following criteria:
- If the match candidate is a validator allocation, the provided public key is matched against the validator public key.
- If the match candidate is a delegator allocation, the provided public key is matched against the delegator public key.
Trait Implementations§
source§impl<'de> Deserialize<'de> for EraInfo
impl<'de> Deserialize<'de> for EraInfo
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for EraInfo
impl Ord for EraInfo
source§impl PartialEq for EraInfo
impl PartialEq for EraInfo
source§impl PartialOrd for EraInfo
impl PartialOrd for EraInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl ToBytes for EraInfo
impl ToBytes for EraInfo
source§fn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Returns the length of the
Vec<u8>
which would be returned from a successful call to
to_bytes()
or into_bytes()
. The data is not actually serialized, so this call is
relatively cheap.source§impl TryFrom<StoredValue> for EraInfo
impl TryFrom<StoredValue> for EraInfo
§type Error = TypeMismatch
type Error = TypeMismatch
The type returned in the event of a conversion error.
impl Eq for EraInfo
impl StructuralEq for EraInfo
impl StructuralPartialEq for EraInfo
Auto Trait Implementations§
impl RefUnwindSafe for EraInfo
impl Send for EraInfo
impl Sync for EraInfo
impl Unpin for EraInfo
impl UnwindSafe for EraInfo
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