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(VersionMessage)
version
Tuple Fields of Version
verack
addr
inv
getdata
notfound
GetBlocks(GetBlocksMessage)
getblocks
Tuple Fields of GetBlocks
GetHeaders(GetHeadersMessage)
getheaders
Tuple Fields of GetHeaders
mempool
Tx(Transaction)
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
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
Reject(Reject)
reject
Tuple Fields of Reject
0: Reject
FeeFilter(i64)
feefilter
Tuple Fields of FeeFilter
0: i64
wtxidrelay
AddrV2(Vec<AddrV2Message>)
addrv2
Tuple Fields of AddrV2
0: Vec<AddrV2Message>
sendaddrv2
Any other message.
Fields of Unknown
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for NetworkMessage
impl Send for NetworkMessage
impl Sync for NetworkMessage
impl Unpin for NetworkMessage
impl UnwindSafe for NetworkMessage
Blanket Implementations
Mutably borrows from an owned value. Read more