Struct cbor_smol::ser::SliceWriter[][src]

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

Implementations

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

pub fn new(slice: &'a mut [u8]) -> SliceWriter<'a>[src]

Wraps a mutable slice so it can be used as a Writer.

pub fn bytes_written(&self) -> usize[src]

Returns the number of bytes written to the underlying slice.

pub fn into_inner(self) -> &'a mut [u8][src]

Returns the underlying slice.

Trait Implementations

impl<'a> Debug for SliceWriter<'a>[src]

impl<'a> Writer for SliceWriter<'a>[src]

type Error = Error

The type of error returned when a write operation fails.

Auto Trait Implementations

impl<'a> Send for SliceWriter<'a>

impl<'a> Sync for SliceWriter<'a>

impl<'a> Unpin for SliceWriter<'a>

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> Same<T> for T

type Output = T

Should always be Self

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.