[−][src]Struct networking::MessageHeader
A Bitcoin Wire Protocol Message Header.
This struct is encapsulated by the BitcoinCodec
, which automatically creates and sends Message Headers at serialization time.
Most users should not need to interact with this struct, but
it is is exported as a convencience to those who don't wish to use the Codec.
Implementations
impl MessageHeader
[src]
pub fn deserialize<T>(
target: &mut T,
expected_magic: u32
) -> Result<MessageHeader, DeserializationError> where
T: Read,
[src]
target: &mut T,
expected_magic: u32
) -> Result<MessageHeader, DeserializationError> where
T: Read,
pub fn get_command(&self) -> Command
[src]
pub fn get_payload_size(&self) -> usize
[src]
pub fn len() -> usize
[src]
Trait Implementations
impl Debug for MessageHeader
[src]
impl Deserializable for MessageHeader
[src]
fn deserialize<R>(target: &mut R) -> Result<Self, DeserializationError> where
R: Read,
[src]
R: Read,
Auto Trait Implementations
impl RefUnwindSafe for MessageHeader
impl Send for MessageHeader
impl Sync for MessageHeader
impl Unpin for MessageHeader
impl UnwindSafe for MessageHeader
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,