Skip to main content

BinaryEncode

Trait BinaryEncode 

Source
pub trait BinaryEncode<P = ()> {
    // Required method
    fn encode(self, encoder: &mut EncodedData);
}
Expand description

Trait for encoding Rust values into the binary protocol. Each type specifies how to serialize itself.

Required Methods§

Source

fn encode(self, encoder: &mut EncodedData)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl BinaryEncode for &bool

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &char

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &f32

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &f64

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &i8

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &i16

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &i32

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &i64

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &isize

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &str

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &u8

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &u16

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &u32

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &u64

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &usize

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &String

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &[bool]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &[char]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &[f32]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &[f64]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &[i8]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &[i16]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &[i32]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &[i64]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &[isize]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &[u8]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &[u16]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &[u32]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &[u64]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &[usize]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &mut [bool]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &mut [char]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &mut [f32]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &mut [f64]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &mut [i8]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &mut [i16]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &mut [i32]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &mut [i64]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &mut [isize]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &mut [u8]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &mut [u16]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &mut [u32]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &mut [u64]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for &mut [usize]

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for bool

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for char

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for f32

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for f64

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for i8

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for i16

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for i32

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for i64

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for i128

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for isize

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for u8

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for u16

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for u32

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for u64

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for u128

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for ()

Source§

fn encode(self, _encoder: &mut EncodedData)

Source§

impl BinaryEncode for usize

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for String

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R> BinaryEncode for &dyn Fn() -> R
where R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R> BinaryEncode for &mut dyn Fn() -> R
where R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R> BinaryEncode for &mut dyn FnMut() -> R
where R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1> BinaryEncode for &dyn Fn(A1) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1> BinaryEncode for &mut dyn Fn(A1) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1> BinaryEncode for &mut dyn FnMut(A1) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2> BinaryEncode for &dyn Fn(A1, A2) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2> BinaryEncode for &mut dyn Fn(A1, A2) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2> BinaryEncode for &mut dyn FnMut(A1, A2) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2, A3> BinaryEncode for &dyn Fn(A1, A2, A3) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, A3: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2, A3> BinaryEncode for &mut dyn Fn(A1, A2, A3) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, A3: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2, A3> BinaryEncode for &mut dyn FnMut(A1, A2, A3) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, A3: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2, A3, A4> BinaryEncode for &dyn Fn(A1, A2, A3, A4) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, A3: BinaryDecode + EncodeTypeDef + 'static, A4: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2, A3, A4> BinaryEncode for &mut dyn Fn(A1, A2, A3, A4) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, A3: BinaryDecode + EncodeTypeDef + 'static, A4: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2, A3, A4> BinaryEncode for &mut dyn FnMut(A1, A2, A3, A4) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, A3: BinaryDecode + EncodeTypeDef + 'static, A4: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2, A3, A4, A5> BinaryEncode for &dyn Fn(A1, A2, A3, A4, A5) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, A3: BinaryDecode + EncodeTypeDef + 'static, A4: BinaryDecode + EncodeTypeDef + 'static, A5: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2, A3, A4, A5> BinaryEncode for &mut dyn Fn(A1, A2, A3, A4, A5) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, A3: BinaryDecode + EncodeTypeDef + 'static, A4: BinaryDecode + EncodeTypeDef + 'static, A5: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2, A3, A4, A5> BinaryEncode for &mut dyn FnMut(A1, A2, A3, A4, A5) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, A3: BinaryDecode + EncodeTypeDef + 'static, A4: BinaryDecode + EncodeTypeDef + 'static, A5: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2, A3, A4, A5, A6> BinaryEncode for &dyn Fn(A1, A2, A3, A4, A5, A6) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, A3: BinaryDecode + EncodeTypeDef + 'static, A4: BinaryDecode + EncodeTypeDef + 'static, A5: BinaryDecode + EncodeTypeDef + 'static, A6: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2, A3, A4, A5, A6> BinaryEncode for &mut dyn Fn(A1, A2, A3, A4, A5, A6) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, A3: BinaryDecode + EncodeTypeDef + 'static, A4: BinaryDecode + EncodeTypeDef + 'static, A5: BinaryDecode + EncodeTypeDef + 'static, A6: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2, A3, A4, A5, A6> BinaryEncode for &mut dyn FnMut(A1, A2, A3, A4, A5, A6) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, A3: BinaryDecode + EncodeTypeDef + 'static, A4: BinaryDecode + EncodeTypeDef + 'static, A5: BinaryDecode + EncodeTypeDef + 'static, A6: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2, A3, A4, A5, A6, A7> BinaryEncode for &dyn Fn(A1, A2, A3, A4, A5, A6, A7) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, A3: BinaryDecode + EncodeTypeDef + 'static, A4: BinaryDecode + EncodeTypeDef + 'static, A5: BinaryDecode + EncodeTypeDef + 'static, A6: BinaryDecode + EncodeTypeDef + 'static, A7: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2, A3, A4, A5, A6, A7> BinaryEncode for &mut dyn Fn(A1, A2, A3, A4, A5, A6, A7) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, A3: BinaryDecode + EncodeTypeDef + 'static, A4: BinaryDecode + EncodeTypeDef + 'static, A5: BinaryDecode + EncodeTypeDef + 'static, A6: BinaryDecode + EncodeTypeDef + 'static, A7: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<R, A1, A2, A3, A4, A5, A6, A7> BinaryEncode for &mut dyn FnMut(A1, A2, A3, A4, A5, A6, A7) -> R
where A1: BinaryDecode + EncodeTypeDef + 'static, A2: BinaryDecode + EncodeTypeDef + 'static, A3: BinaryDecode + EncodeTypeDef + 'static, A4: BinaryDecode + EncodeTypeDef + 'static, A5: BinaryDecode + EncodeTypeDef + 'static, A6: BinaryDecode + EncodeTypeDef + 'static, A7: BinaryDecode + EncodeTypeDef + 'static, R: BinaryEncode + EncodeTypeDef + 'static,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<T> BinaryEncode for &[T]
where T: JsGeneric,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<T> BinaryEncode for &mut [T]
where T: JsGeneric,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<T: JsGeneric> BinaryEncode for &T

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<T: BinaryEncode> BinaryEncode for Box<[T]>

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<T: BinaryEncode> BinaryEncode for Vec<T>

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<T: BinaryEncode<P>, P> BinaryEncode<P> for Option<T>

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<T: BinaryEncode, E: BinaryEncode> BinaryEncode for Result<T, E>

Source§

fn encode(self, encoder: &mut EncodedData)

Implementors§