Struct casper_types::auction::Bid [−][src]
An entry in a founding validator map.
Implementations
impl Bid
[src]
pub fn locked(
bonding_purse: URef,
staked_amount: U512,
release_timestamp_millis: u64
) -> Self
[src]
bonding_purse: URef,
staked_amount: U512,
release_timestamp_millis: u64
) -> Self
Creates new instance of a bid with locked funds.
pub fn unlocked(
bonding_purse: URef,
staked_amount: U512,
delegation_rate: DelegationRate
) -> Self
[src]
bonding_purse: URef,
staked_amount: U512,
delegation_rate: DelegationRate
) -> Self
Creates new instance of a bid with unlocked funds.
pub fn bonding_purse(&self) -> &URef
[src]
Gets the bonding purse of the provided bid
pub fn staked_amount(&self) -> &U512
[src]
Gets the staked amount of the provided bid
pub fn delegation_rate(&self) -> &DelegationRate
[src]
Gets the delegation rate of the provided bid
pub fn vesting_schedule(&self) -> Option<&VestingSchedule>
[src]
Returns a reference to the vesting schedule of the provided bid. None
if a non-genesis
validator.
pub fn vesting_schedule_mut(&mut self) -> Option<&mut VestingSchedule>
[src]
Returns a mutable reference to the vesting schedule of the provided bid. None
if a
non-genesis validator.
pub fn delegators(&self) -> &BTreeMap<PublicKey, Delegator>
[src]
Returns a reference to the delegators of the provided bid
pub fn delegators_mut(&mut self) -> &mut BTreeMap<PublicKey, Delegator>
[src]
Returns a mutable reference to the delegators of the provided bid
pub fn reward(&self) -> &U512
[src]
Returns the seigniorage reward of the provided bid
pub fn decrease_stake(
&mut self,
amount: U512,
era_end_timestamp_millis: u64
) -> Result<U512, Error>
[src]
&mut self,
amount: U512,
era_end_timestamp_millis: u64
) -> Result<U512, Error>
Decreases the stake of the provided bid
pub fn increase_stake(&mut self, amount: U512) -> Result<U512, Error>
[src]
Increases the stake of the provided bid
pub fn increase_reward(&mut self, amount: U512) -> Result<U512, Error>
[src]
Increases the seigniorage reward of the provided bid
pub fn zero_reward(&mut self)
[src]
Zeros the seigniorage reward of the provided bid
pub fn with_delegation_rate(
&mut self,
delegation_rate: DelegationRate
) -> &mut Self
[src]
&mut self,
delegation_rate: DelegationRate
) -> &mut Self
Updates the delegation rate of the provided bid
pub fn process(&mut self, timestamp_millis: u64) -> bool
[src]
Initializes the vesting schedule of provided bid if the provided timestamp is greater than or equal to the bid's initial release timestamp and the bid is owned by a genesis validator.
Returns true
if the provided bid's vesting schedule was initialized.
pub fn total_staked_amount(&self) -> Result<U512, Error>
[src]
Returns the total staked amount of validator + all delegators
Trait Implementations
impl CLTyped for Bid
[src]
impl Clone for Bid
[src]
impl Debug for Bid
[src]
impl<'de> Deserialize<'de> for Bid
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl From<&'_ Bid> for SeigniorageRecipient
[src]
impl FromBytes for Bid
[src]
fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>
[src]
fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>
[src]
impl PartialEq<Bid> for Bid
[src]
impl Serialize for Bid
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Bid
[src]
impl ToBytes for Bid
[src]
Auto Trait Implementations
impl RefUnwindSafe for Bid
[src]
impl Send for Bid
[src]
impl Sync for Bid
[src]
impl Unpin for Bid
[src]
impl UnwindSafe for Bid
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,