[][src]Struct binjs_io::bytes::lengthwriter::LengthWriter

pub struct LengthWriter { /* fields omitted */ }

An implementation of Write that discards its data but remembers how many bytes were written.

Methods

impl LengthWriter[src]

pub fn new() -> Self[src]

Create an empty LengthWriter.

pub fn len(&self) -> Bytes[src]

Return the number of bytes written since creation.

Trait Implementations

impl Default for LengthWriter[src]

impl Write for LengthWriter[src]

fn flush(&mut self) -> Result<(), Error>[src]

Do nothing.

fn write(&mut self, buf: &[u8]) -> Result<usize, Error>[src]

Pretend to successfully write bytes, only record the number of bytes meant to be written.

Auto Trait Implementations

impl RefUnwindSafe for LengthWriter

impl Send for LengthWriter

impl Sync for LengthWriter

impl Unpin for LengthWriter

impl UnwindSafe for LengthWriter

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> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<W> WriteBytesExt for W where
    W: Write + ?Sized
[src]

impl<T> WriteVarFloat for T where
    T: Write
[src]

impl<T> WriteVarNum for T where
    T: Write
[src]