Struct chain_impl_mockchain::ledger::Pots
source · pub struct Pots {
pub(crate) fees: Value,
pub(crate) treasury: Treasury,
pub(crate) rewards: Value,
}
Expand description
Special pots of money
Fields§
§fees: Value
§treasury: Treasury
§rewards: Value
Implementations§
source§impl Pots
impl Pots
pub fn entries(&self) -> Entries<'_> ⓘ
pub fn values(&self) -> Values<'_> ⓘ
sourcepub fn total_value(&self) -> Result<Value, ValueError>
pub fn total_value(&self) -> Result<Value, ValueError>
Sum the total values in the pots
sourcepub fn draw_reward(&mut self, expected_reward: Value) -> Value
pub fn draw_reward(&mut self, expected_reward: Value) -> Value
Draw rewards from the pot
sourcepub fn draw_treasury(&mut self, expected_treasury: Value) -> Value
pub fn draw_treasury(&mut self, expected_treasury: Value) -> Value
Draw rewards from the pot
sourcepub fn siphon_fees(&mut self) -> Value
pub fn siphon_fees(&mut self) -> Value
Siphon all the fees
sourcepub fn fees_value(&self) -> Value
pub fn fees_value(&self) -> Value
Get the value in the treasury
sourcepub fn treasury_value(&self) -> Value
pub fn treasury_value(&self) -> Value
Get the value in the treasury
pub fn set_from_entry(&mut self, e: &Entry)
Trait Implementations§
source§impl PartialEq<Pots> for Pots
impl PartialEq<Pots> for Pots
impl Eq for Pots
impl StructuralEq for Pots
impl StructuralPartialEq for Pots
Auto Trait Implementations§
impl RefUnwindSafe for Pots
impl Send for Pots
impl Sync for Pots
impl Unpin for Pots
impl UnwindSafe for Pots
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