pub struct TreasuryDiff { /* private fields */ }Expand description
Wraps together the identifiers of the milestones that created and consumed treasury outputs.
Implementations§
Source§impl TreasuryDiff
impl TreasuryDiff
Sourcepub fn new(created: MilestoneId, consumed: MilestoneId) -> Self
pub fn new(created: MilestoneId, consumed: MilestoneId) -> Self
Creates a new TreasuryDiff.
Sourcepub fn created(&self) -> &MilestoneId
pub fn created(&self) -> &MilestoneId
Returns the id of the milestone that created the treasury output associated to the TreasuryDiff.
Sourcepub fn consumed(&self) -> &MilestoneId
pub fn consumed(&self) -> &MilestoneId
Returns the id of the milestone that consumed the treasury input associated to the TreasuryDiff.
Trait Implementations§
Source§impl Clone for TreasuryDiff
impl Clone for TreasuryDiff
Source§fn clone(&self) -> TreasuryDiff
fn clone(&self) -> TreasuryDiff
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TreasuryDiff
impl Debug for TreasuryDiff
impl Eq for TreasuryDiff
Source§impl Packable for TreasuryDiff
impl Packable for TreasuryDiff
Source§type UnpackError = <MilestoneId as Packable>::UnpackError
type UnpackError = <MilestoneId as Packable>::UnpackError
The error type that can be returned if some semantic error occurs while unpacking. Read more
Source§type UnpackVisitor = <MilestoneId as Packable>::UnpackVisitor
type UnpackVisitor = <MilestoneId as Packable>::UnpackVisitor
FIXME: docs
Source§fn pack<P: Packer>(&self, packer: &mut P) -> Result<(), P::Error>
fn pack<P: Packer>(&self, packer: &mut P) -> Result<(), P::Error>
Packs this value into the given
Packer.Source§fn unpack<U: Unpacker, const VERIFY: bool>(
unpacker: &mut U,
visitor: &Self::UnpackVisitor,
) -> Result<Self, UnpackError<Self::UnpackError, U::Error>>
fn unpack<U: Unpacker, const VERIFY: bool>( unpacker: &mut U, visitor: &Self::UnpackVisitor, ) -> Result<Self, UnpackError<Self::UnpackError, U::Error>>
Unpacks this value from the given
Unpacker. The VERIFY generic parameter can be used to skip additional
syntactic checks.Source§impl PartialEq for TreasuryDiff
impl PartialEq for TreasuryDiff
impl StructuralPartialEq for TreasuryDiff
Auto Trait Implementations§
impl Freeze for TreasuryDiff
impl RefUnwindSafe for TreasuryDiff
impl Send for TreasuryDiff
impl Sync for TreasuryDiff
impl Unpin for TreasuryDiff
impl UnsafeUnpin for TreasuryDiff
impl UnwindSafe for TreasuryDiff
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<P> PackableExt for Pwhere
P: Packable,
impl<P> PackableExt for Pwhere
P: Packable,
Source§fn unpack_verified<T>(
bytes: T,
visitor: &<P as Packable>::UnpackVisitor,
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
fn unpack_verified<T>( bytes: T, visitor: &<P as Packable>::UnpackVisitor, ) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
Unpacks this value from a type that implements [AsRef<[u8]>].
Source§fn unpack_unverified<T>(
bytes: T,
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
fn unpack_unverified<T>( bytes: T, ) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
Unpacks this value from a type that implements [AsRef<[u8]>] skipping some syntatical checks.
Source§fn packed_len(&self) -> usize
fn packed_len(&self) -> usize
Returns the length in bytes of the value after being packed. The returned value always matches the number of
bytes written using
pack.