pub struct Sender<'a, M: RawMutex, T: Clone>(/* private fields */);Expand description
A sender of a Watch channel.
For a simpler type definition, consider [DynSender] at the expense of
some runtime performance due to dynamic dispatch.
Methods from Deref<Target = Snd<'a, T, Watch<M, T>>>§
Sourcepub fn clear(&self)
pub fn clear(&self)
Clears the value of the Watch.
This will cause calls to [Rcv::get] to be pending.
Sourcepub fn contains_value(&self) -> bool
pub fn contains_value(&self) -> bool
Returns true if the Watch contains a value.
Trait Implementations§
Auto Trait Implementations§
impl<'a, M, T> Freeze for Sender<'a, M, T>
impl<'a, M, T> !RefUnwindSafe for Sender<'a, M, T>
impl<'a, M, T> Send for Sender<'a, M, T>
impl<'a, M, T> Sync for Sender<'a, M, T>
impl<'a, M, T> Unpin for Sender<'a, M, T>where
T: Unpin,
impl<'a, M, T> !UnwindSafe for Sender<'a, M, T>
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