pub(super) struct Receiver {
rx: Receiver<()>,
}
Fields§
§rx: Receiver<()>
Implementations§
source§impl Receiver
impl Receiver
sourcepub(crate) fn wait(&mut self, timeout: Option<Duration>) -> bool
pub(crate) fn wait(&mut self, timeout: Option<Duration>) -> bool
Blocks the current thread until all Sender
handles drop.
If timeout
is Some
, the thread is blocked for at most timeout
duration. If timeout
is None
, then the thread is blocked until the
shutdown signal is received.
If the timeout has elapsed, it returns false
, otherwise it returns true
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Receiver
impl !RefUnwindSafe for Receiver
impl Send for Receiver
impl Sync for Receiver
impl Unpin for Receiver
impl !UnwindSafe for Receiver
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