Struct bee_ledger::types::OutputDiff[][src]

pub struct OutputDiff { /* fields omitted */ }
Expand description

A type to record output and treasury changes that happened within a milestone.

Implementations

impl OutputDiff[src]

pub fn new(
    created_outputs: Vec<OutputId>,
    consumed_outputs: Vec<OutputId>,
    treasury_diff: Option<TreasuryDiff>
) -> Self
[src]

Creates a new OutputDiff.

pub fn created_outputs(&self) -> &[OutputId][src]

Returns the created outputs of the OutputDiff.

pub fn consumed_outputs(&self) -> &[OutputId][src]

Returns the consumed outputs of the OutputDiff.

pub fn treasury_diff(&self) -> Option<&TreasuryDiff>[src]

Returns the treasury diff of the OutputDiff.

Trait Implementations

impl Debug for OutputDiff[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Packable for OutputDiff[src]

type Error = Error

Associated error type.

fn packed_len(&self) -> usize[src]

Returns the length of the packed bytes.

fn pack<W: Write>(&self, writer: &mut W) -> Result<(), Self::Error>[src]

Packs the instance to bytes and writes them to the passed writer.

fn unpack_inner<R: Read + ?Sized, const CHECK: bool>(
    reader: &mut R
) -> Result<Self, Self::Error>
[src]

Reads bytes from the passed reader and unpacks them into an instance.

fn pack_new(&self) -> Vec<u8, Global>[src]

Packs the instance to bytes and writes them to a newly allocated vector.

fn unpack<R>(reader: &mut R) -> Result<Self, Self::Error> where
    R: Read + ?Sized
[src]

Reads bytes from the passed reader and unpacks them into an instance. Applies syntactic checks. Read more

fn unpack_unchecked<R>(reader: &mut R) -> Result<Self, Self::Error> where
    R: Read + ?Sized
[src]

Reads bytes from the passed reader and unpacks them into an instance. Doesn’t apply syntactic checks. Read more

impl PartialEq<OutputDiff> for OutputDiff[src]

fn eq(&self, other: &OutputDiff) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &OutputDiff) -> bool[src]

This method tests for !=.

impl Eq for OutputDiff[src]

impl StructuralEq for OutputDiff[src]

impl StructuralPartialEq for OutputDiff[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

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]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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]

Performs the conversion.