pub struct Producer<'a, const N: usize> { /* private fields */ }Expand description
A handle for writing to the buffer.
Implementations§
Source§impl<'a, const N: usize> Producer<'a, N>
impl<'a, const N: usize> Producer<'a, N>
Sourcepub fn bytes_available(&self) -> usize
pub fn bytes_available(&self) -> usize
Returns the number of bytes available to write.
Sourcepub fn writable_bytes(&mut self) -> WritableBytes<'_, N>
pub fn writable_bytes(&mut self) -> WritableBytes<'_, N>
Returns a WritableBytes handle granting access to the next contiguous slice of free space.
This may not return all available space if the free space wraps around the end of the buffer. In that case, you will need to commit the returned bytes and call this again to get the rest.
Trait Implementations§
Auto Trait Implementations§
impl<'a, const N: usize> Freeze for Producer<'a, N>
impl<'a, const N: usize> !RefUnwindSafe for Producer<'a, N>
impl<'a, const N: usize> Send for Producer<'a, N>
impl<'a, const N: usize> Sync for Producer<'a, N>
impl<'a, const N: usize> Unpin for Producer<'a, N>
impl<'a, const N: usize> !UnwindSafe for Producer<'a, N>
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