pub struct PeerNetMsg {
pub header: PeerNetMsgHeader,
pub payload: Vec<u8>,
}Expand description
Wire envelope for the peer data-plane (the persistent FramedConn between two Nodes after the data-plane handshake).
Fields§
§header: PeerNetMsgHeader§payload: Vec<u8>Implementations§
Source§impl PeerNetMsg
impl PeerNetMsg
pub fn new<T: Encode>(command: PeerNetCmd, t: T) -> Result<Self>
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for PeerNetMsg
impl<'__de, __Context> BorrowDecode<'__de, __Context> for PeerNetMsg
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for PeerNetMsg
impl Clone for PeerNetMsg
Source§fn clone(&self) -> PeerNetMsg
fn clone(&self) -> PeerNetMsg
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PeerNetMsg
impl Debug for PeerNetMsg
Source§impl<__Context> Decode<__Context> for PeerNetMsg
impl<__Context> Decode<__Context> for PeerNetMsg
Auto Trait Implementations§
impl Freeze for PeerNetMsg
impl RefUnwindSafe for PeerNetMsg
impl Send for PeerNetMsg
impl Sync for PeerNetMsg
impl Unpin for PeerNetMsg
impl UnsafeUnpin for PeerNetMsg
impl UnwindSafe for PeerNetMsg
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