Struct rex::queue::StreamableDeque
source · 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 fn stream(&self) -> StreamReceiver<'_, T>
pub fn stream(&self) -> StreamReceiver<'_, T>
Returns a stream of items using pop_front() This opens us up to handle a back_stream() as well
Trait Implementations§
Auto Trait Implementations§
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