Struct muse_channel::ValueReceiver
source · pub struct ValueReceiver { /* private fields */ }Expand description
A receiver of [RootedValue]s that are sent by one or more
ValueSenders.
Implementations§
source§impl ValueReceiver
impl ValueReceiver
sourcepub fn recv(&self) -> Option<RootedValue>
pub fn recv(&self) -> Option<RootedValue>
Reads the oldest [RootedValue] from the channel, blocking the current
thread until a value is received.
Returns None if all ValueSenders have been dropped before a value
is received.
sourcepub fn recv_async(&self) -> RecvAsync<'_> ⓘ
pub fn recv_async(&self) -> RecvAsync<'_> ⓘ
Reads the oldest [RootedValue] from the channel, blocking the current
task until a value is received.
Returns None if all ValueSenders have been dropped before a value
is received.
sourcepub fn senders(&self) -> usize
pub fn senders(&self) -> usize
Returns the number of associated ValueSenders that have not been
dropped.
sourcepub fn is_disconnected(&self) -> bool
pub fn is_disconnected(&self) -> bool
Returns true if all associated ValueSenders have been dropped.
Trait Implementations§
source§impl Clone for ValueReceiver
impl Clone for ValueReceiver
source§impl CustomType for ValueReceiver
impl CustomType for ValueReceiver
source§impl Debug for ValueReceiver
impl Debug for ValueReceiver
source§impl Drop for ValueReceiver
impl Drop for ValueReceiver
impl ContainsNoRefs for ValueReceiver
Auto Trait Implementations§
impl Freeze for ValueReceiver
impl !RefUnwindSafe for ValueReceiver
impl Send for ValueReceiver
impl Sync for ValueReceiver
impl Unpin for ValueReceiver
impl !UnwindSafe for ValueReceiver
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
§impl<A> Cast for A
impl<A> Cast for A
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)