[][src]Struct ordcode::buf::DeBytesWriter

pub struct DeBytesWriter<'a> { /* fields omitted */ }

Adapter type which implements double-ended write byte buffer over mutable byte slice

DeBytesWriter implements WriteBytes and TailWriteBytes, and can be used with Serializer.

Implementations

impl<'a> DeBytesWriter<'a>[src]

pub fn new(buf: &'a mut [u8]) -> Self[src]

Use provided byte slice as buffer

pub fn finalize(&mut self) -> Result<usize>[src]

Finalize by collapsing extra space in internal buffer

Returns data length, which is smaller or equal to the original buffer size.

pub fn is_complete(&self) -> Result[src]

Checks if buffer completely filled

Trait Implementations

impl<'a> TailWriteBytes for DeBytesWriter<'a>[src]

impl<'a> WriteBytes for DeBytesWriter<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for DeBytesWriter<'a>[src]

impl<'a> Send for DeBytesWriter<'a>[src]

impl<'a> Sync for DeBytesWriter<'a>[src]

impl<'a> Unpin for DeBytesWriter<'a>[src]

impl<'a> !UnwindSafe for DeBytesWriter<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.