pub struct Message<PayloadDefinition> { /* private fields */ }Implementations§
Source§impl<PayloadDefinition: PayloadWireFormat> Message<PayloadDefinition>
impl<PayloadDefinition: PayloadWireFormat> Message<PayloadDefinition>
pub const fn new(header: Header, payload: PayloadDefinition) -> Self
pub fn new_sd( request_id: u32, sd_header: &<PayloadDefinition as PayloadWireFormat>::SdHeader, ) -> Self
pub fn header(&self) -> &Header
pub const fn is_sd(&self) -> bool
pub fn set_request_id(&mut self, request_id: u32)
pub fn get_sd_header( &self, ) -> Option<&<PayloadDefinition as PayloadWireFormat>::SdHeader>
pub fn payload(&self) -> &PayloadDefinition
pub fn payload_mut(&mut self) -> &mut PayloadDefinition
Trait Implementations§
Source§impl<PayloadDefinition: PayloadWireFormat> WireFormat for Message<PayloadDefinition>
impl<PayloadDefinition: PayloadWireFormat> WireFormat for Message<PayloadDefinition>
Source§fn decode<R: Read>(reader: &mut R) -> Result<Self, Error>
fn decode<R: Read>(reader: &mut R) -> Result<Self, Error>
Deserialize a value from a byte stream.
Returns Ok(
Some(value)) if the stream contains a complete value.
Returns Ok(None) if the stream is empty. Read moreSource§fn required_size(&self) -> usize
fn required_size(&self) -> usize
Returns the number of bytes required to serialize this value.
impl<PayloadDefinition: Eq> Eq for Message<PayloadDefinition>
impl<PayloadDefinition> StructuralPartialEq for Message<PayloadDefinition>
Auto Trait Implementations§
impl<PayloadDefinition> Freeze for Message<PayloadDefinition>where
PayloadDefinition: Freeze,
impl<PayloadDefinition> RefUnwindSafe for Message<PayloadDefinition>where
PayloadDefinition: RefUnwindSafe,
impl<PayloadDefinition> Send for Message<PayloadDefinition>where
PayloadDefinition: Send,
impl<PayloadDefinition> Sync for Message<PayloadDefinition>where
PayloadDefinition: Sync,
impl<PayloadDefinition> Unpin for Message<PayloadDefinition>where
PayloadDefinition: Unpin,
impl<PayloadDefinition> UnsafeUnpin for Message<PayloadDefinition>where
PayloadDefinition: UnsafeUnpin,
impl<PayloadDefinition> UnwindSafe for Message<PayloadDefinition>where
PayloadDefinition: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more