Struct CrcWriter

struct CrcWriter<W> { ... }

A wrapper around a Write that calculates the CRC.

Implementations

impl<W> CrcWriter<W>

fn crc(self: &Self) -> &Crc

Get the Crc for this CrcWriter.

fn into_inner(self: Self) -> W

Get the writer that is wrapped by this CrcWriter.

fn get_ref(self: &Self) -> &W

Get the writer that is wrapped by this CrcWriter by reference.

fn get_mut(self: &mut Self) -> &mut W

Get a mutable reference to the writer that is wrapped by this CrcWriter.

fn reset(self: &mut Self)

Reset the Crc in this CrcWriter.

impl<W: Write> CrcWriter<W>

fn new(w: W) -> CrcWriter<W>

Create a new CrcWriter.

impl<T> Any for CrcWriter<W>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for CrcWriter<W>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for CrcWriter<W>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for CrcWriter<W>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for CrcWriter<W>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for CrcWriter<W>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for CrcWriter<W>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>

impl<W> Freeze for CrcWriter<W>

impl<W> RefUnwindSafe for CrcWriter<W>

impl<W> Send for CrcWriter<W>

impl<W> Sync for CrcWriter<W>

impl<W> Unpin for CrcWriter<W>

impl<W> UnsafeUnpin for CrcWriter<W>

impl<W> UnwindSafe for CrcWriter<W>

impl<W: $crate::fmt::Debug> Debug for CrcWriter<W>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<W: Write> Write for CrcWriter<W>

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