Struct nanocurrency_protocol::NanoCurrencyCodec
[−]
[src]
pub struct NanoCurrencyCodec;
Methods
impl NanoCurrencyCodec
[src]
pub fn read_block<C: Read>(cursor: &mut C, block_ty: u8) -> Result<Block>
[src]
pub fn block_type_num(block: &Block) -> u8
[src]
pub fn write_block(buf: &mut BytesMut, block: Block)
[src]
Does NOT include block type
pub fn network_magic_byte(network: Network) -> u8
[src]
Trait Implementations
impl Decoder for NanoCurrencyCodec
[src]
type Item = (MessageHeader, Message)
The type of decoded frames.
type Error = Error
The type of unrecoverable frame decoding errors. Read more
fn decode(&mut self, buf: &mut BytesMut) -> Result<Option<Self::Item>>
[src]
Attempts to decode a frame from the provided buffer of bytes. Read more
fn decode_eof(
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
[src]
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
A default method available to be called when there are no more bytes available to be read from the underlying I/O. Read more