# [−] [src] Trait message::Payload

    pub trait Payload: Send + 'static {
        fn version() -> u32;
        fn command() -> &'static str;
        fn deserialize_payload<T>(
            reader: &mut Reader<T>,
            version: u32
        ) -> MessageResult<Self>
        where
            Self: Sized,
            T: Read;
        fn serialize_payload(
            &self,
            stream: &mut Stream,
            version: u32
        ) -> MessageResult<()>;
    }

## Required Methods

### `fn version() -> u32`

### `fn command() -> &'static str`

### `fn deserialize_payload<T>(
reader: &mut Reader<T>,
version: u32
) -> MessageResult<Self> where
Self: Sized,
T: Read,`

### `fn serialize_payload(
&self,
stream: &mut Stream,
version: u32
) -> MessageResult<()>`

## Implementors

###

`impl Payload for Addr`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for Version`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for Reject`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for Block`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for BlockTxn`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for CompactBlock`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for FeeFilter`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for FilterAdd`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for FilterClear`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( _reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, _stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for FilterLoad`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for GetAddr`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( _reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, _stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for GetBlockTxn`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for GetBlocks`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for GetData`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for GetHeaders`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for Headers`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for Inv`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for MemPool`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( _reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, _stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for MerkleBlock`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for NotFound`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for Ping`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for Pong`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for SendCompact`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for SendHeaders`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( _reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, _stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for Tx`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

###

`impl Payload for Verack`

[src]

####

`fn version() -> u32`

[src]

####

`fn command() -> &'static str`

[src]

####

`fn deserialize_payload<T>( _reader: &mut Reader<T>, _version: u32 ) -> MessageResult<Self> where T: Read,`

[src]

####

`fn serialize_payload( &self, _stream: &mut Stream, _version: u32 ) -> MessageResult<()>`

[src]

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g. `str,u8` or `String,struct:Vec,test`)