pub struct BusReceiver { /* private fields */ }Implementations§
Source§impl BusReceiver
impl BusReceiver
pub fn recv(&self) -> Option<BusEvent>
pub fn try_recv(&self) -> Option<BusEvent>
pub fn iter(&self) -> impl Iterator<Item = BusEvent> + '_
pub fn recv_message(&self) -> Option<BusMessage>
pub fn try_recv_message(&self) -> Option<BusMessage>
pub fn iter_with_ids(&self) -> impl Iterator<Item = BusMessage> + '_
Sourcepub fn log_events(&self)
pub fn log_events(&self)
Blocks and prints events in a common default format ([name] eos,
[name] error: ..., [name] dropped a buffer (queue full),
[name] seeked: requested ... landed ...) until every corresponding
Bus sender has been dropped. This consumes both events already
queued and events posted while the call is waiting; use
BusReceiver::try_recv to drain only what is currently available.
Convenience for examples and smoke tests; anything that needs to
act on specific events — e.g. deciding whether an Error warrants
a crate::pipeline::Pipeline::stop — should match on iter()
directly instead, where error’s concrete variant (see
crate::error::Error) is still available, not just its
Display text.
Auto Trait Implementations§
impl Freeze for BusReceiver
impl RefUnwindSafe for BusReceiver
impl Send for BusReceiver
impl Sync for BusReceiver
impl Unpin for BusReceiver
impl UnsafeUnpin for BusReceiver
impl UnwindSafe for BusReceiver
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