pub struct EventReceiver { /* private fields */ }Available on crate feature
events only.Expand description
Wrapper around broadcast receiver with convenience methods
Implementations§
Source§impl EventReceiver
impl EventReceiver
Sourcepub async fn recv(&mut self) -> Option<CommerceEvent>
pub async fn recv(&mut self) -> Option<CommerceEvent>
Receive the next event, waiting if necessary
Sourcepub fn try_recv(&mut self) -> Option<CommerceEvent>
pub fn try_recv(&mut self) -> Option<CommerceEvent>
Try to receive an event without waiting
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventReceiver
impl RefUnwindSafe for EventReceiver
impl Send for EventReceiver
impl Sync for EventReceiver
impl Unpin for EventReceiver
impl UnsafeUnpin for EventReceiver
impl UnwindSafe for EventReceiver
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