Struct e_write_buffer::WriteBuffer[][src]

pub struct WriteBuffer<const N: usize> { /* fields omitted */ }

A write buffer

Implementations

impl<const N: usize> WriteBuffer<N>[src]

pub fn new() -> Self[src]

Creates a write buffer

pub fn as_slice(&self) -> &[u8][src]

Returns the valid portion of the buffer as slice

pub fn reset(&mut self)[src]

Reset the buffer to be reused

pub fn as_str(&self) -> Option<&str>[src]

Converts the buffer in &str, returnig None if some bytes doesn’t resemble valid utf-8

Trait Implementations

impl<const N: usize> Debug for WriteBuffer<N>[src]

impl<const N: usize> Write for WriteBuffer<N>[src]

Auto Trait Implementations

impl<const N: usize> Send for WriteBuffer<N>

impl<const N: usize> Sync for WriteBuffer<N>

impl<const N: usize> Unpin for WriteBuffer<N>

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.