pub struct NanoCurrencyCodec(pub Network);Tuple Fields§
§0: NetworkImplementations§
Source§impl NanoCurrencyCodec
impl NanoCurrencyCodec
pub fn read_block<C: Read>(cursor: &mut C, block_ty: u8) -> Result<Block>
pub fn block_type_num(ty: BlockType) -> u8
Sourcepub fn write_block(buf: &mut BytesMut, block: Block)
pub fn write_block(buf: &mut BytesMut, block: Block)
Does NOT include block type
pub fn network_magic_byte(network: Network) -> u8
Trait Implementations§
Source§impl Decoder for NanoCurrencyCodec
impl Decoder for NanoCurrencyCodec
Source§type Item = (MessageHeader, Message)
type Item = (MessageHeader, Message)
The type of decoded frames.
Source§fn decode(&mut self, buf: &mut BytesMut) -> Result<Option<Self::Item>>
fn decode(&mut self, buf: &mut BytesMut) -> Result<Option<Self::Item>>
Attempts to decode a frame from the provided buffer of bytes. Read more
Auto Trait Implementations§
impl Freeze for NanoCurrencyCodec
impl RefUnwindSafe for NanoCurrencyCodec
impl Send for NanoCurrencyCodec
impl Sync for NanoCurrencyCodec
impl Unpin for NanoCurrencyCodec
impl UnwindSafe for NanoCurrencyCodec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more