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)

Implementations on Foreign Types§

Source§

impl BinaryEncode for &str

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl BinaryEncode for bool

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<T> BinaryEncode for &[T]
where &'a T: for<'a> BinaryEncode,

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

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

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl<T> BinaryEncode for &T

Source§

fn encode(self, encoder: &mut EncodedData)

Implementors§

Source§

impl BinaryEncode for &JsValue

Source§

impl BinaryEncode for String

Source§

impl BinaryEncode for Clamped<&[u8]>

Source§

impl BinaryEncode for Clamped<&mut [u8]>

Source§

impl BinaryEncode for Clamped<Vec<u8>>

Source§

impl BinaryEncode for JsValue

Source§

impl<F> BinaryEncode for &Closure<F>
where F: ?Sized,

Source§

impl<F> BinaryEncode for CallbackKey<F>
where F: ?Sized,

Source§

impl<F> BinaryEncode for Closure<F>
where F: ?Sized,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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§

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

Source§

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

Source§

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