Struct CrcWriter
pub struct CrcWriter<W> { /* private fields */ }
A wrapper around a Write that calculates the CRC.
Implementations
impl<W> CrcWriter<W>
fn crc(&self) -> &CrcGet the Crc for this
CrcWriter.fn into_inner(self) -> WGet the writer that is wrapped by this
CrcWriter.fn get_ref(&self) -> &WGet the writer that is wrapped by this
CrcWriterby reference.fn get_mut(&mut self) -> &mut WGet a mutable reference to the writer that is wrapped by this
CrcWriter.fn reset(&mut self)Reset the Crc in this
CrcWriter.
impl<W: Write> CrcWriter<W>
fn new(w: W) -> CrcWriter<W>Create a new
CrcWriter.
Trait Implementations
impl<W: Debug> Debug for CrcWriter<W>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<W: Write> Write for CrcWriter<W>
fn write(&mut self, buf: &[u8]) -> Result<usize>fn flush(&mut self) -> Result<()>
Auto Trait Implementations
impl<W> Freeze for CrcWriter<W>
where
W: Freeze,
impl<W> RefUnwindSafe for CrcWriter<W>
where
W: RefUnwindSafe,
impl<W> Send for CrcWriter<W>
where
W: Send,
impl<W> Sync for CrcWriter<W>
where
W: Sync,
impl<W> Unpin for CrcWriter<W>
where
W: Unpin,
impl<W> UnsafeUnpin for CrcWriter<W>
where
W: UnsafeUnpin,
impl<W> UnwindSafe for CrcWriter<W>
where
W: UnwindSafe,
Blanket Implementations
impl<T> Any for CrcWriter<W>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for CrcWriter<W>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for CrcWriter<W>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for CrcWriter<W>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for CrcWriter<W>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for CrcWriter<W>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for CrcWriter<W>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>