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§
source§impl From<IndexationPayload> for Payload
impl From<IndexationPayload> for Payload
source§fn from(payload: IndexationPayload) -> Self
fn from(payload: IndexationPayload) -> Self
Converts to this type from the input type.
source§impl From<MilestonePayload> for Payload
impl From<MilestonePayload> for Payload
source§fn from(payload: MilestonePayload) -> Self
fn from(payload: MilestonePayload) -> Self
Converts to this type from the input type.
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 From<TransactionPayload> for Payload
impl From<TransactionPayload> for Payload
source§fn from(payload: TransactionPayload) -> Self
fn from(payload: TransactionPayload) -> Self
Converts to this type from the input type.
source§impl From<TreasuryTransactionPayload> for Payload
impl From<TreasuryTransactionPayload> for Payload
source§fn from(payload: TreasuryTransactionPayload) -> Self
fn from(payload: TreasuryTransactionPayload) -> Self
Converts to this type from the input type.
source§impl Packable for Payload
impl Packable for Payload
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.