Struct bee_message::prelude::Message
source · pub struct Message { /* private fields */ }
Expand description
Represent the object that nodes gossip around the network.
Implementations§
source§impl Message
impl Message
sourcepub fn builder() -> MessageBuilder
pub fn builder() -> MessageBuilder
Creates a new MessageBuilder
to construct an instance of a Message
.
sourcepub fn network_id(&self) -> u64
pub fn network_id(&self) -> u64
Returns the network id of a Message
.
sourcepub fn into_parents(self) -> Parents
pub fn into_parents(self) -> Parents
Trait Implementations§
source§impl Packable for Message
impl Packable for Message
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.