pub struct FilteredReceiver<F>{ /* private fields */ }Expand description
A receiver that applies a user-supplied predicate to incoming events.
Implementations§
Source§impl<F> FilteredReceiver<F>
impl<F> FilteredReceiver<F>
Sourcepub async fn recv(&mut self) -> Option<EventPayload>
pub async fn recv(&mut self) -> Option<EventPayload>
Receive the next event that passes the filter.
Skips events that do not match the predicate. Returns None when the
channel is closed.
Auto Trait Implementations§
impl<F> Freeze for FilteredReceiver<F>where
F: Freeze,
impl<F> !RefUnwindSafe for FilteredReceiver<F>
impl<F> Send for FilteredReceiver<F>where
F: Send,
impl<F> Sync for FilteredReceiver<F>where
F: Sync,
impl<F> Unpin for FilteredReceiver<F>where
F: Unpin,
impl<F> UnsafeUnpin for FilteredReceiver<F>where
F: UnsafeUnpin,
impl<F> !UnwindSafe for FilteredReceiver<F>
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