Skip to main content

WireDecode

Trait WireDecode 

Source
pub trait WireDecode: Sized {
    // Required method
    fn wire_decode(buf: &[u8], pos: &mut usize) -> Option<Self>;
}
Expand description

A value that reconstructs from the shared wire format.

Required Methods§

Source

fn wire_decode(buf: &[u8], pos: &mut usize) -> Option<Self>

Read one value starting at *pos, advancing pos. None on any malformed input.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl WireDecode for bool

Source§

fn wire_decode(buf: &[u8], pos: &mut usize) -> Option<Self>

Source§

impl WireDecode for f64

Source§

fn wire_decode(buf: &[u8], pos: &mut usize) -> Option<Self>

Source§

impl WireDecode for i64

Source§

fn wire_decode(buf: &[u8], pos: &mut usize) -> Option<Self>

Source§

impl WireDecode for String

Source§

fn wire_decode(buf: &[u8], pos: &mut usize) -> Option<Self>

Source§

impl<T: WireDecode> WireDecode for Box<T>

Source§

fn wire_decode(buf: &[u8], pos: &mut usize) -> Option<Self>

Source§

impl<T: WireDecode> WireDecode for Vec<T>

Source§

fn wire_decode(buf: &[u8], pos: &mut usize) -> Option<Self>

Implementors§