[][src]Struct bitcoin::network::message::RawNetworkMessage

pub struct RawNetworkMessage {
    pub magic: u32,
    pub payload: NetworkMessage,
}

A Network message

Fields

magic: u32

Magic bytes to identify the network these messages are meant for

payload: NetworkMessage

The actual message data

Methods

impl RawNetworkMessage[src]

pub fn cmd(&self) -> &'static str[src]

Return the message command as a static string reference.

This returns "unknown" for [NetworkMessage::Unknown], regardless of the actual command in the unknown message. Use the [command] method to get the command for unknown messages.

pub fn command(&self) -> CommandString[src]

Return the CommandString for the message command.

Trait Implementations

impl Encodable for RawNetworkMessage[src]

impl Decodable for RawNetworkMessage[src]

impl Clone for RawNetworkMessage[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<RawNetworkMessage> for RawNetworkMessage[src]

impl Eq for RawNetworkMessage[src]

impl Debug for RawNetworkMessage[src]

Auto Trait Implementations

impl Unpin for RawNetworkMessage

impl Sync for RawNetworkMessage

impl Send for RawNetworkMessage

impl UnwindSafe for RawNetworkMessage

impl RefUnwindSafe for RawNetworkMessage

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]