Enum bitcoin::network::message::NetworkMessage[][src]

pub enum NetworkMessage {
Show 29 variants Version(VersionMessage), Verack, Addr(Vec<(u32, Address)>), Inv(Vec<Inventory>), GetData(Vec<Inventory>), NotFound(Vec<Inventory>), GetBlocks(GetBlocksMessage), GetHeaders(GetHeadersMessage), MemPool, Tx(Transaction), Block(Block), Headers(Vec<BlockHeader>), SendHeaders, GetAddr, Ping(u64), Pong(u64), GetCFilters(GetCFilters), CFilter(CFilter), GetCFHeaders(GetCFHeaders), CFHeaders(CFHeaders), GetCFCheckpt(GetCFCheckpt), CFCheckpt(CFCheckpt), Alert(Vec<u8>), Reject(Reject), FeeFilter(i64), WtxidRelay, AddrV2(Vec<AddrV2Message>), SendAddrV2, Unknown { command: CommandString, payload: Vec<u8>, },
}
Expand description

A Network message payload. Proper documentation is available on at Bitcoin Wiki: Protocol Specification

Variants

version

Tuple Fields of Version

0: VersionMessage
Verack

verack

Addr(Vec<(u32, Address)>)

addr

Tuple Fields of Addr

0: Vec<(u32, Address)>

inv

Tuple Fields of Inv

0: Vec<Inventory>
GetData(Vec<Inventory>)

getdata

Tuple Fields of GetData

0: Vec<Inventory>
NotFound(Vec<Inventory>)

notfound

Tuple Fields of NotFound

0: Vec<Inventory>
GetBlocks(GetBlocksMessage)

getblocks

Tuple Fields of GetBlocks

0: GetBlocksMessage
GetHeaders(GetHeadersMessage)

getheaders

Tuple Fields of GetHeaders

0: GetHeadersMessage
MemPool

mempool

tx

Tuple Fields of Tx

0: Transaction
Block(Block)

block

Tuple Fields of Block

0: Block
Headers(Vec<BlockHeader>)

headers

Tuple Fields of Headers

0: Vec<BlockHeader>
SendHeaders

sendheaders

GetAddr

getaddr

Ping(u64)

ping

Tuple Fields of Ping

0: u64
Pong(u64)

pong

Tuple Fields of Pong

0: u64
GetCFilters(GetCFilters)

BIP157 getcfilters

Tuple Fields of GetCFilters

0: GetCFilters
CFilter(CFilter)

BIP157 cfilter

Tuple Fields of CFilter

0: CFilter
GetCFHeaders(GetCFHeaders)

BIP157 getcfheaders

Tuple Fields of GetCFHeaders

0: GetCFHeaders
CFHeaders(CFHeaders)

BIP157 cfheaders

Tuple Fields of CFHeaders

0: CFHeaders
GetCFCheckpt(GetCFCheckpt)

BIP157 getcfcheckpt

Tuple Fields of GetCFCheckpt

0: GetCFCheckpt
CFCheckpt(CFCheckpt)

BIP157 cfcheckpt

Tuple Fields of CFCheckpt

0: CFCheckpt
Alert(Vec<u8>)

alert

Tuple Fields of Alert

0: Vec<u8>
Reject(Reject)

reject

Tuple Fields of Reject

0: Reject
FeeFilter(i64)

feefilter

Tuple Fields of FeeFilter

0: i64
WtxidRelay

wtxidrelay

addrv2

Tuple Fields of AddrV2

0: Vec<AddrV2Message>
SendAddrV2

sendaddrv2

Unknown

Any other message.

Fields of Unknown

command: CommandString

The command of this message.

payload: Vec<u8>

The payload of this message.

Implementations

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.

Return the CommandString for the message command.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.