Enum bee_message::payload::Payload
source · [−]pub enum Payload {
Transaction(Box<TransactionPayload>),
Milestone(Box<MilestonePayload>),
Indexation(Box<IndexationPayload>),
Receipt(Box<ReceiptPayload>),
TreasuryTransaction(Box<TreasuryTransactionPayload>),
}Expand description
A generic payload that can represent different types defining message payloads.
Variants
Transaction(Box<TransactionPayload>)
A transaction payload.
Milestone(Box<MilestonePayload>)
A milestone payload.
Indexation(Box<IndexationPayload>)
An indexation payload.
Receipt(Box<ReceiptPayload>)
A receipt payload.
TreasuryTransaction(Box<TreasuryTransactionPayload>)
A treasury transaction payload.
Implementations
Trait Implementations
sourceimpl From<IndexationPayload> for Payload
impl From<IndexationPayload> for Payload
sourcefn from(payload: IndexationPayload) -> Self
fn from(payload: IndexationPayload) -> Self
Converts to this type from the input type.
sourceimpl From<MilestonePayload> for Payload
impl From<MilestonePayload> for Payload
sourcefn from(payload: MilestonePayload) -> Self
fn from(payload: MilestonePayload) -> Self
Converts to this type from the input type.
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 From<TransactionPayload> for Payload
impl From<TransactionPayload> for Payload
sourcefn from(payload: TransactionPayload) -> Self
fn from(payload: TransactionPayload) -> Self
Converts to this type from the input type.
sourceimpl From<TreasuryTransactionPayload> for Payload
impl From<TreasuryTransactionPayload> for Payload
sourcefn from(payload: TreasuryTransactionPayload) -> Self
fn from(payload: TreasuryTransactionPayload) -> Self
Converts to this type from the input type.
sourceimpl Packable for Payload
impl Packable for Payload
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.
impl Eq for Payload
impl StructuralEq for Payload
impl StructuralPartialEq for Payload
Auto Trait Implementations
impl RefUnwindSafe for Payload
impl Send for Payload
impl Sync for Payload
impl Unpin for Payload
impl UnwindSafe for Payload
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