pub struct BCrcBlockWriter<'a, A: BStackAllocator> { /* private fields */ }Expand description
A cursor-based writer over the bytes covered by a BCrcBlockView.
Implements io::Write and io::Seek within the coordinate space of the
view. Every write automatically recomputes the CRC32 checksum over the
full block data (not just the active view range), keeping the block’s
integrity invariant intact. Constructed via BCrcBlock::writer,
BCrcBlock::writer_at, BCrcBlockView::writer, or BCrcBlockView::writer_at.
Implementations§
Source§impl<'a, A: BStackAllocator> BCrcBlockWriter<'a, A>
impl<'a, A: BStackAllocator> BCrcBlockWriter<'a, A>
Trait Implementations§
Source§impl<'a, A: Clone + BStackAllocator> Clone for BCrcBlockWriter<'a, A>
impl<'a, A: Clone + BStackAllocator> Clone for BCrcBlockWriter<'a, A>
Source§impl<'a, A: BStackAllocator> Debug for BCrcBlockWriter<'a, A>
impl<'a, A: BStackAllocator> Debug for BCrcBlockWriter<'a, A>
impl<'a, A: BStackAllocator> Eq for BCrcBlockWriter<'a, A>
Source§impl<'a, A: BStackAllocator> Hash for BCrcBlockWriter<'a, A>
impl<'a, A: BStackAllocator> Hash for BCrcBlockWriter<'a, A>
Source§impl<'a, A: BStackAllocator> Ord for BCrcBlockWriter<'a, A>
impl<'a, A: BStackAllocator> Ord for BCrcBlockWriter<'a, A>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a, A: BStackAllocator> PartialEq for BCrcBlockWriter<'a, A>
Two writers compare equal when their active slice and cursor position match.
impl<'a, A: BStackAllocator> PartialEq for BCrcBlockWriter<'a, A>
Two writers compare equal when their active slice and cursor position match.
Source§impl<'a, A: BStackAllocator> PartialEq<BCrcBlockReader<'a, A>> for BCrcBlockWriter<'a, A>
impl<'a, A: BStackAllocator> PartialEq<BCrcBlockReader<'a, A>> for BCrcBlockWriter<'a, A>
Source§fn eq(&self, other: &BCrcBlockReader<'a, A>) -> bool
fn eq(&self, other: &BCrcBlockReader<'a, A>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'a, A: BStackAllocator> PartialEq<BCrcBlockWriter<'a, A>> for BCrcBlockReader<'a, A>
Two readers compare equal when their active slice and cursor position match.
impl<'a, A: BStackAllocator> PartialEq<BCrcBlockWriter<'a, A>> for BCrcBlockReader<'a, A>
Two readers compare equal when their active slice and cursor position match.
Source§fn eq(&self, other: &BCrcBlockWriter<'a, A>) -> bool
fn eq(&self, other: &BCrcBlockWriter<'a, A>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'a, A: BStackAllocator> PartialOrd for BCrcBlockWriter<'a, A>
Ordered by absolute payload position, then by active length.
impl<'a, A: BStackAllocator> PartialOrd for BCrcBlockWriter<'a, A>
Ordered by absolute payload position, then by active length.
Source§impl<'a, A: BStackAllocator> PartialOrd<BCrcBlockReader<'a, A>> for BCrcBlockWriter<'a, A>
impl<'a, A: BStackAllocator> PartialOrd<BCrcBlockReader<'a, A>> for BCrcBlockWriter<'a, A>
Source§impl<'a, A: BStackAllocator> PartialOrd<BCrcBlockWriter<'a, A>> for BCrcBlockReader<'a, A>
Ordered by absolute payload position, then by active length.
impl<'a, A: BStackAllocator> PartialOrd<BCrcBlockWriter<'a, A>> for BCrcBlockReader<'a, A>
Ordered by absolute payload position, then by active length.
Source§impl<'a, A: BStackAllocator> Seek for BCrcBlockWriter<'a, A>
impl<'a, A: BStackAllocator> Seek for BCrcBlockWriter<'a, A>
Source§fn seek(&mut self, pos: SeekFrom) -> Result<u64>
fn seek(&mut self, pos: SeekFrom) -> Result<u64>
Seek to an offset, in bytes, in a stream. Read more
1.55.0 · Source§fn rewind(&mut self) -> Result<(), Error>
fn rewind(&mut self) -> Result<(), Error>
Rewind to the beginning of a stream. Read more
Source§fn stream_len(&mut self) -> Result<u64, Error>
fn stream_len(&mut self) -> Result<u64, Error>
🔬This is a nightly-only experimental API. (
seek_stream_len)Returns the length of this stream (in bytes). Read more
Source§impl<'a, A: BStackAllocator> Write for BCrcBlockWriter<'a, A>
impl<'a, A: BStackAllocator> Write for BCrcBlockWriter<'a, A>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[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<'a, A> Freeze for BCrcBlockWriter<'a, A>
impl<'a, A> RefUnwindSafe for BCrcBlockWriter<'a, A>where
A: RefUnwindSafe,
impl<'a, A> Send for BCrcBlockWriter<'a, A>where
A: Sync,
impl<'a, A> Sync for BCrcBlockWriter<'a, A>where
A: Sync,
impl<'a, A> Unpin for BCrcBlockWriter<'a, A>
impl<'a, A> UnsafeUnpin for BCrcBlockWriter<'a, A>
impl<'a, A> UnwindSafe for BCrcBlockWriter<'a, A>where
A: RefUnwindSafe,
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