pub struct HashingWriter<W> { /* private fields */ }Implementations§
Source§impl<W> HashingWriter<W>
impl<W> HashingWriter<W>
pub fn new(inner: W) -> Self
pub fn length(&self) -> u64
pub fn digest(&self) -> ContentDigest
pub fn into_inner(self) -> W
Trait Implementations§
Source§impl<W: Write> Write for HashingWriter<W>
impl<W: Write> Write for HashingWriter<W>
Source§fn write(&mut self, bytes: &[u8]) -> Result<usize>
fn write(&mut self, bytes: &[u8]) -> Result<usize>
Writes a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector)1.0.0 · Source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
Source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations§
impl<W> Forget for HashingWriter<W>
impl<W> Freeze for HashingWriter<W>where
W: Freeze,
PhantomData<(UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, OidSha256)>: Freeze,
GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplOdd<u8, [u8; 0]>>>>>>>: Freeze,
PhantomData<Eager>: Freeze,
impl<W> Move for HashingWriter<W>
impl<W> RefUnwindSafe for HashingWriter<W>where
W: RefUnwindSafe,
GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplOdd<u8, [u8; 0]>>>>>>>: RefUnwindSafe,
Eager: RefUnwindSafe,
impl<W> Send for HashingWriter<W>
impl<W> Sync for HashingWriter<W>
impl<W> Unpin for HashingWriter<W>
impl<W> UnsafeUnpin for HashingWriter<W>where
W: UnsafeUnpin,
PhantomData<(UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, OidSha256)>: UnsafeUnpin,
GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplOdd<u8, [u8; 0]>>>>>>>: UnsafeUnpin,
PhantomData<Eager>: UnsafeUnpin,
impl<W> UnwindSafe for HashingWriter<W>where
W: UnwindSafe,
GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplEven<u8, GenericArrayImplOdd<u8, [u8; 0]>>>>>>>: UnwindSafe,
Eager: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more