pub struct StreamableDeque<T> { /* private fields */ }Expand description
This type acts similarly to std::collections::VecDeque but
modifying queue is async
Implementations§
Source§impl<T> StreamableDeque<T>
impl<T> StreamableDeque<T>
pub fn new() -> Self
Sourcepub fn push_front(&self, item: T)
pub fn push_front(&self, item: T)
Push an item into the queue and notify first receiver
Sourcepub fn push_back(&self, item: T)
pub fn push_back(&self, item: T)
Push an item into the back of the queue and notify first receiver
Sourcepub const fn stream(&self) -> StreamReceiver<'_, T>
pub const fn stream(&self) -> StreamReceiver<'_, T>
Returns a stream of items using pop_front()
This opens us up to handle a back_stream() as well
pub fn pop_front(&self) -> Option<T>
Trait Implementations§
Source§impl<T> Debug for StreamableDeque<T>
impl<T> Debug for StreamableDeque<T>
Source§impl<T> Default for StreamableDeque<T>
impl<T> Default for StreamableDeque<T>
Auto Trait Implementations§
impl<T> !Freeze for StreamableDeque<T>
impl<T> !RefUnwindSafe for StreamableDeque<T>
impl<T> Send for StreamableDeque<T>where
T: Send,
impl<T> Sync for StreamableDeque<T>where
T: Send,
impl<T> Unpin for StreamableDeque<T>where
T: Unpin,
impl<T> UnwindSafe for StreamableDeque<T>where
T: UnwindSafe,
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