pub type FrozenProd<R> = Frozen<R, true, false>;
Expand description
Frozen write end of some ring buffer.
Inserted items is not visible for an opposite write end until Self::commit
/Self::sync
is called or Self
is dropped.
A free space of items removed by an opposite write end is not visible for Self
until Self::sync
is called.
Aliased Type§
struct FrozenProd<R> { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl<R: RbRef> Producer for FrozenProd<R>
impl<R: RbRef> Producer for FrozenProd<R>
Source§unsafe fn set_write_index(&self, value: usize)
unsafe fn set_write_index(&self, value: usize)
Set read index. Read more
Source§unsafe fn advance_write_index(&self, count: usize)
unsafe fn advance_write_index(&self, count: usize)
Source§fn vacant_slices(
&self,
) -> (&[MaybeUninit<Self::Item>], &[MaybeUninit<Self::Item>])
fn vacant_slices( &self, ) -> (&[MaybeUninit<Self::Item>], &[MaybeUninit<Self::Item>])
Provides a direct access to the ring buffer vacant memory. Read more
Source§fn vacant_slices_mut(
&mut self,
) -> (&mut [MaybeUninit<Self::Item>], &mut [MaybeUninit<Self::Item>])
fn vacant_slices_mut( &mut self, ) -> (&mut [MaybeUninit<Self::Item>], &mut [MaybeUninit<Self::Item>])
Mutable version of
Self::vacant_slices
. Read moreSource§fn try_push(&mut self, elem: Self::Item) -> Result<(), Self::Item>
fn try_push(&mut self, elem: Self::Item) -> Result<(), Self::Item>
Appends an item to the ring buffer. Read more
Source§fn push_iter<I: Iterator<Item = Self::Item>>(&mut self, iter: I) -> usize
fn push_iter<I: Iterator<Item = Self::Item>>(&mut self, iter: I) -> usize
Appends items from an iterator to the ring buffer.
Elements that haven’t been added to the ring buffer remain in the iterator. Read more
Source§impl<R: RbRef> Write for FrozenProd<R>
impl<R: RbRef> Write for FrozenProd<R>
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