Trait const_writer::ConstWrite[][src]

pub trait ConstWrite<'a, T: ConstWriterAdapter + ConstWriterAdapterCreate<'a, Self>> {
    fn const_writer<const N: usize>(&'a mut self) -> ConstWriter<T, {N}> { ... }
}

Get ConstWriter for given type

Provided methods

fn const_writer<const N: usize>(&'a mut self) -> ConstWriter<T, {N}>[src]

Get ConstWriter to write N bytes.

Because contract on ConstWriterAdapterCreate::new we can be sure that underlying buffer can accept at least N bytes. And because write methods reduces N as they write to buffer we can be sure that code which writes more thanN bytes wont compile (N is usize so negative value will be compile error)

Loading content...

Implementations on Foreign Types

impl<'a, 'inner> ConstWrite<'a, SliceWriterAdapter<'a, 'inner>> for &'inner mut [u8][src]

impl<'a> ConstWrite<'a, VecWriterAdapter<'a>> for Vec<u8>[src]

Loading content...

Implementors

Loading content...