Enum grin_p2p::msg::MsgHeaderWrapper
source · pub enum MsgHeaderWrapper {
Known(MsgHeader),
Unknown(u64, u8),
}
Expand description
A wrapper around a message header. If the header is for an unknown msg type then we will be unable to parse the msg itself (just a bunch of random bytes). But we need to know how many bytes to discard to discard the full message.
Variants§
Known(MsgHeader)
A “known” msg type with deserialized msg header.
Unknown(u64, u8)
An unknown msg type with corresponding msg size in bytes.
Trait Implementations§
source§impl Clone for MsgHeaderWrapper
impl Clone for MsgHeaderWrapper
source§fn clone(&self) -> MsgHeaderWrapper
fn clone(&self) -> MsgHeaderWrapper
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for MsgHeaderWrapper
impl RefUnwindSafe for MsgHeaderWrapper
impl Send for MsgHeaderWrapper
impl Sync for MsgHeaderWrapper
impl Unpin for MsgHeaderWrapper
impl UnwindSafe for MsgHeaderWrapper
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
source§impl<'a, T> DefaultFeatures<'a> for T
impl<'a, T> DefaultFeatures<'a> for T
source§fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a>>
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a>>
Clone this value, and then immediately put it into a
Box
behind a trait object of this trait.source§impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
source§fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a>>
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a>>
Clone this value, and then immediately put it into a
Box
behind a trait object of this trait.