Trait Instance

Source
pub trait Instance: Entry + Sized {
    // Required methods
    fn len(&self) -> usize;
    fn buf_len(buf: BufConst<Self>) -> usize;
    fn encode(&self, buf: BufMut<Self>) -> usize;
}

Required Methods§

Source

fn len(&self) -> usize

Source

fn buf_len(buf: BufConst<Self>) -> usize

Source

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

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 String

Source§

fn len(&self) -> usize

Source§

fn buf_len(buf: BufConst<Self>) -> usize

Source§

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

Source§

impl<'a> Instance for &'a [u8]

Source§

fn len(&self) -> usize

Source§

fn buf_len(buf: BufConst<Self>) -> usize

Source§

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

Implementors§