Struct bitcoin::network::message::RawNetworkMessage [−][src]
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
Implementations
impl RawNetworkMessage
[src]
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 Self::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 Clone for RawNetworkMessage
[src]
impl Clone for RawNetworkMessage
[src]fn clone(&self) -> RawNetworkMessage
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Decodable for RawNetworkMessage
[src]
impl Decodable for RawNetworkMessage
[src]fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>
[src]
impl Encodable for RawNetworkMessage
[src]
impl Encodable for RawNetworkMessage
[src]impl PartialEq<RawNetworkMessage> for RawNetworkMessage
[src]
impl PartialEq<RawNetworkMessage> for RawNetworkMessage
[src]