Trait Instance

Source
pub trait Instance: Entry {
    const LEN: usize;

    // Required method
    fn encode(&self, buf: BufMut<Self>);
}

Required Associated Constants§

Required Methods§

Source

fn encode(&self, buf: BufMut<Self>)

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 Instance for bool

Source§

const LEN: usize = 1usize

Source§

fn encode(&self, buf: BufMut<Self>)

Source§

impl Instance for char

Source§

const LEN: usize = 4usize

Source§

fn encode(&self, buf: BufMut<Self>)

Source§

impl Instance for f32

Source§

const LEN: usize = 4usize

Source§

fn encode(&self, buf: BufMut<Self>)

Source§

impl Instance for f64

Source§

const LEN: usize = 8usize

Source§

fn encode(&self, buf: BufMut<Self>)

Source§

impl Instance for i8

Source§

const LEN: usize = 1usize

Source§

fn encode(&self, buf: BufMut<Self>)

Source§

impl Instance for i32

Source§

const LEN: usize = 4usize

Source§

fn encode(&self, buf: BufMut<Self>)

Source§

impl Instance for i64

Source§

const LEN: usize = 8usize

Source§

fn encode(&self, buf: BufMut<Self>)

Source§

impl Instance for i128

Source§

const LEN: usize = 16usize

Source§

fn encode(&self, buf: BufMut<Self>)

Source§

impl Instance for u8

Source§

const LEN: usize = 1usize

Source§

fn encode(&self, buf: BufMut<Self>)

Source§

impl Instance for u32

Source§

const LEN: usize = 4usize

Source§

fn encode(&self, buf: BufMut<Self>)

Source§

impl Instance for u64

Source§

const LEN: usize = 8usize

Source§

fn encode(&self, buf: BufMut<Self>)

Source§

impl Instance for u128

Source§

const LEN: usize = 16usize

Source§

fn encode(&self, buf: BufMut<Self>)

Source§

impl Instance for ()

Source§

const LEN: usize = 0usize

Source§

fn encode(&self, _buf: BufMut<Self>)

Source§

impl<T> Instance for PhantomData<T>

Source§

const LEN: usize = 0usize

Source§

fn encode(&self, _buf: BufMut<Self>)

Source§

impl<T: Fixed> Instance for Option<T>

Source§

const LEN: usize

Source§

fn encode(&self, buf: BufMut<Self>)

Source§

impl<T: Fixed, const N: usize> Instance for [T; N]

Source§

const LEN: usize

Source§

default fn encode(&self, buf: BufMut<Self>)

Source§

impl<const N: usize> Instance for [u8; N]

Source§

fn encode(&self, buf: BufMut<Self>)

Implementors§

Source§

impl<const LEN: usize, T: Base> Instance for Value<LEN, T>

Source§

const LEN: usize = LEN