Struct bee_message::payload::receipt::ReceiptPayload
source · [−]pub struct ReceiptPayload { /* private fields */ }Expand description
Receipt is a listing of migrated funds.
Implementations
sourceimpl ReceiptPayload
impl ReceiptPayload
sourcepub fn new(
migrated_at: MilestoneIndex,
last: bool,
funds: Vec<MigratedFundsEntry>,
transaction: Payload
) -> Result<Self, Error>
pub fn new(
migrated_at: MilestoneIndex,
last: bool,
funds: Vec<MigratedFundsEntry>,
transaction: Payload
) -> Result<Self, Error>
Creates a new ReceiptPayload.
sourcepub fn migrated_at(&self) -> MilestoneIndex
pub fn migrated_at(&self) -> MilestoneIndex
Returns the milestone index at which the funds of a ReceiptPayload were migrated at in the legacy network.
sourcepub fn last(&self) -> bool
pub fn last(&self) -> bool
Returns whether a ReceiptPayload is the final one for a given migrated at index.
sourcepub fn funds(&self) -> &[MigratedFundsEntry]
pub fn funds(&self) -> &[MigratedFundsEntry]
The funds which were migrated with a ReceiptPayload.
sourcepub fn transaction(&self) -> &Payload
pub fn transaction(&self) -> &Payload
The TreasuryTransaction used to fund the funds of a ReceiptPayload.
Trait Implementations
sourceimpl Clone for ReceiptPayload
impl Clone for ReceiptPayload
sourcefn clone(&self) -> ReceiptPayload
fn clone(&self) -> ReceiptPayload
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ReceiptPayload
impl Debug for ReceiptPayload
sourceimpl From<ReceiptPayload> for Payload
impl From<ReceiptPayload> for Payload
sourcefn from(payload: ReceiptPayload) -> Self
fn from(payload: ReceiptPayload) -> Self
Converts to this type from the input type.
sourceimpl Packable for ReceiptPayload
impl Packable for ReceiptPayload
sourcefn packed_len(&self) -> usize
fn packed_len(&self) -> usize
Returns the length of the packed bytes.
sourcefn 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.
sourcefn 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.
sourcefn pack_new(&self) -> Vec<u8, Global>
fn pack_new(&self) -> Vec<u8, Global>
Packs the instance to bytes and writes them to a newly allocated vector.
sourceimpl PartialEq<ReceiptPayload> for ReceiptPayload
impl PartialEq<ReceiptPayload> for ReceiptPayload
sourcefn eq(&self, other: &ReceiptPayload) -> bool
fn eq(&self, other: &ReceiptPayload) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &ReceiptPayload) -> bool
fn ne(&self, other: &ReceiptPayload) -> bool
This method tests for !=.
impl Eq for ReceiptPayload
impl StructuralEq for ReceiptPayload
impl StructuralPartialEq for ReceiptPayload
Auto Trait Implementations
impl RefUnwindSafe for ReceiptPayload
impl Send for ReceiptPayload
impl Sync for ReceiptPayload
impl Unpin for ReceiptPayload
impl UnwindSafe for ReceiptPayload
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more