pub struct NetMsg {
pub header: NetMsgHeader,
pub payload: Vec<u8>,
}
Expand description
Defines the main message in the karyon p2p network.
This message structure consists of a header and payload, where the header typically contains essential information about the message, and the payload contains the actual data being transmitted.
Fields§
§header: NetMsgHeader
§payload: Vec<u8>
Implementations§
Trait Implementations§
Source§impl<'__de> BorrowDecode<'__de> for NetMsg
impl<'__de> BorrowDecode<'__de> for NetMsg
Source§fn borrow_decode<__D: BorrowDecoder<'__de>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Auto Trait Implementations§
impl Freeze for NetMsg
impl RefUnwindSafe for NetMsg
impl Send for NetMsg
impl Sync for NetMsg
impl Unpin for NetMsg
impl UnwindSafe for NetMsg
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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