Expand description
The broadcaster side of the channel.
Implementations
sourceimpl<T: Clone + Unpin> Sender<T>
impl<T: Clone + Unpin> Sender<T>
sourcepub fn try_send(&self, item: T) -> Result<(), TrySendError<T>>
pub fn try_send(&self, item: T) -> Result<(), TrySendError<T>>
Try to broadcast a message to all receivers. If the message cap is reached, this will fail.
sourcepub fn send(&self, item: T) -> Result<(), SendError<T>>
pub fn send(&self, item: T) -> Result<(), SendError<T>>
Broadcast a message to all receivers. If the message cap is reached, this will block until the queue is no longer full.
sourcepub fn send_async(&self, item: T) -> SendFut<'_, T>ⓘNotable traits for SendFut<'a, T>impl<'a, T: Clone + Unpin> Future for SendFut<'a, T> type Output = Result<(), SendError<T>>;
pub fn send_async(&self, item: T) -> SendFut<'_, T>ⓘNotable traits for SendFut<'a, T>impl<'a, T: Clone + Unpin> Future for SendFut<'a, T> type Output = Result<(), SendError<T>>;
Broadcast a message to all receivers. If the message cap is reached, this will asynchronously wait until the queue is no longer full.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for Sender<T>
impl<T> Send for Sender<T> where
T: Send + Sync,
impl<T> Sync for Sender<T> where
T: Send + Sync,
impl<T> Unpin for Sender<T>
impl<T> !UnwindSafe for Sender<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more