Struct bee_message::payload::receipt::ReceiptPayload
source · pub struct ReceiptPayload { /* private fields */ }Expand description
Receipt is a listing of migrated funds.
Implementations§
source§impl 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§
source§impl Clone for ReceiptPayload
impl Clone for ReceiptPayload
source§fn clone(&self) -> ReceiptPayload
fn clone(&self) -> ReceiptPayload
Returns a copy 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 ReceiptPayload
impl Debug for ReceiptPayload
source§impl From<ReceiptPayload> for Payload
impl From<ReceiptPayload> for Payload
source§fn from(payload: ReceiptPayload) -> Self
fn from(payload: ReceiptPayload) -> Self
Converts to this type from the input type.
source§impl Packable for ReceiptPayload
impl Packable for ReceiptPayload
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, Global>
fn pack_new(&self) -> Vec<u8, Global>
Packs the instance to bytes and writes them to a newly allocated vector.
source§impl PartialEq<ReceiptPayload> for ReceiptPayload
impl PartialEq<ReceiptPayload> for ReceiptPayload
source§fn 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 ==.