pub struct OutputDiff { /* private fields */ }Expand description
A type to record output and treasury changes that happened within a milestone.
Implementations§
Source§impl OutputDiff
impl OutputDiff
Sourcepub fn new(
created_outputs: Vec<OutputId>,
consumed_outputs: Vec<OutputId>,
treasury_diff: Option<TreasuryDiff>,
) -> Self
pub fn new( created_outputs: Vec<OutputId>, consumed_outputs: Vec<OutputId>, treasury_diff: Option<TreasuryDiff>, ) -> Self
Creates a new OutputDiff.
Sourcepub fn created_outputs(&self) -> &[OutputId]
pub fn created_outputs(&self) -> &[OutputId]
Returns the created outputs of the OutputDiff.
Sourcepub fn consumed_outputs(&self) -> &[OutputId]
pub fn consumed_outputs(&self) -> &[OutputId]
Returns the consumed outputs of the OutputDiff.
Sourcepub fn treasury_diff(&self) -> Option<&TreasuryDiff>
pub fn treasury_diff(&self) -> Option<&TreasuryDiff>
Returns the treasury diff of the OutputDiff.
Trait Implementations§
Source§impl Clone for OutputDiff
impl Clone for OutputDiff
Source§fn clone(&self) -> OutputDiff
fn clone(&self) -> OutputDiff
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 OutputDiff
impl Debug for OutputDiff
Source§impl Packable for OutputDiff
impl Packable for OutputDiff
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 OutputDiff
impl PartialEq for OutputDiff
impl Eq for OutputDiff
impl StructuralPartialEq for OutputDiff
Auto Trait Implementations§
impl Freeze for OutputDiff
impl RefUnwindSafe for OutputDiff
impl Send for OutputDiff
impl Sync for OutputDiff
impl Unpin for OutputDiff
impl UnwindSafe for OutputDiff
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