Skip to main content

FrozenProd

Type Alias FrozenProd 

Source
pub type FrozenProd<R> = Frozen<R, true, false>;
๐Ÿ‘ŽDeprecated:

use CachingProd; writes are now published immediately

Expand description

Deprecated producer wrapper. All inserted items are published immediately.

Aliased Typeยง

pub struct FrozenProd<R> { /* private fields */ }

Implementationsยง

Sourceยง

impl<R: RbRef> FrozenProd<R>

Source

pub fn discard(&mut self)

๐Ÿ‘ŽDeprecated:

discard is now a no-op because writes are immediately published; stage items outside the ring buffer to support rollback

Does nothing: inserted items are already published and cannot be retracted.

Stage items outside the ring buffer if they may need to be discarded.

Trait Implementationsยง

Sourceยง

impl<R: RbRef> DelegateProducer for FrozenProd<R>

Sourceยง

impl<R: RbRef> Write for FrozenProd<R>
where Self: Producer<Item = u8>,

Available on crate feature std only.
Sourceยง

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<()>

Flushes this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
1.36.0 ยท Sourceยง

fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>

Like write, except that it writes from a slice of buffers. Read more
Sourceยง

fn is_write_vectored(&self) -> bool

๐Ÿ”ฌThis is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored implementation. Read more
1.0.0 ยท Sourceยง

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>

๐Ÿ”ฌThis is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer. Read more
1.0.0 ยท Sourceยง

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Error>

Writes a formatted string into this writer, returning any error encountered. Read more
1.0.0 ยท Sourceยง

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Creates a โ€œby referenceโ€ adapter for this instance of Write. Read more
Sourceยง

impl<R: RbRef> Write for FrozenProd<R>
where Self: Producer<Item = u8>,

Sourceยง

fn write_str(&mut self, s: &str) -> Result

Writes a string slice into this writer, returning whether the write succeeded. Read more
1.1.0 ยท Sourceยง

fn write_char(&mut self, c: char) -> Result<(), Error>

Writes a char into this writer, returning whether the write succeeded. Read more
1.0.0 ยท Sourceยง

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Error>

Glue for usage of the write! macro with implementors of this trait. Read more