pub struct Header<T: Sized + IntoVecBytes + Clone> {
pub value: T,
}
Expand description
A simple header struct to be used for serialization and deserialization of messages.
Fields§
§value: T
Implementations§
source§impl Header<usize>
impl Header<usize>
sourcepub fn from_bytes(bytes: &[u8; 8]) -> MessageHeader
pub fn from_bytes(bytes: &[u8; 8]) -> MessageHeader
sourcepub fn from_vector_bytes(
bytes: Vec<u8>,
) -> Result<MessageHeader, NanoServiceError>
pub fn from_vector_bytes( bytes: Vec<u8>, ) -> Result<MessageHeader, NanoServiceError>
Trait Implementations§
impl<T: Sized + IntoVecBytes + Clone> StructuralPartialEq for Header<T>
Auto Trait Implementations§
impl<T> Freeze for Header<T>where
T: Freeze,
impl<T> RefUnwindSafe for Header<T>where
T: RefUnwindSafe,
impl<T> Send for Header<T>where
T: Send,
impl<T> Sync for Header<T>where
T: Sync,
impl<T> Unpin for Header<T>where
T: Unpin,
impl<T> UnwindSafe for Header<T>where
T: 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