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 · 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
Source§impl Packable for TreasuryDiff
impl Packable for TreasuryDiff
Source§fn packed_len(&self) -> usize
fn packed_len(&self) -> usize
Returns the length of the packed bytes.
Source§fn pack<W: Write>(&self, writer: &mut W) -> Result<(), Self::Error>
fn pack<W: Write>(&self, writer: &mut W) -> Result<(), Self::Error>
Packs the instance to bytes and writes them to the passed writer.
Source§fn unpack_inner<R: Read + ?Sized, const CHECK: bool>(
reader: &mut R,
) -> Result<Self, Self::Error>
fn unpack_inner<R: Read + ?Sized, const CHECK: bool>( reader: &mut R, ) -> Result<Self, Self::Error>
Reads bytes from the passed reader and unpacks them into an instance.
Source§fn pack_new(&self) -> Vec<u8> ⓘ
fn pack_new(&self) -> Vec<u8> ⓘ
Packs the instance to bytes and writes them to a newly allocated vector.
Source§impl PartialEq for TreasuryDiff
impl PartialEq for TreasuryDiff
impl Eq 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 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