pub struct Reader<T> { /* private fields */ }
Expand description
Reader for a blocking circular buffer with items of type T
.
Implementations§
Source§impl<T> Reader<T>
impl<T> Reader<T>
Sourcepub fn slice(&mut self) -> Option<&[T]>
pub fn slice(&mut self) -> Option<&[T]>
Blocks until there is data to read or until the writer is dropped.
If all data is read and the writer is dropped, all following calls will
return None
. If Some
is returned, the contained slice is never empty.
Auto Trait Implementations§
impl<T> Freeze for Reader<T>
impl<T> RefUnwindSafe for Reader<T>where
T: RefUnwindSafe,
impl<T> Send for Reader<T>
impl<T> !Sync for Reader<T>
impl<T> Unpin for Reader<T>
impl<T> UnwindSafe for Reader<T>where
T: 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