pub struct SyncSender<T> { /* private fields */ }
Expand description
The sending half of a channel.
Implementations§
Source§impl<T> SyncSender<T>
impl<T> SyncSender<T>
Sourcepub fn into_async(self) -> Sender<T>
pub fn into_async(self) -> Sender<T>
Converts SyncSender
to asynchronous Sender
.
Sourcepub fn send(&self, value: T) -> Result<(), SendError<T>>
pub fn send(&self, value: T) -> Result<(), SendError<T>>
Send a single value.
Returns SendError if all receivers are dropped.
Sourcepub fn send_iter<I>(&self, values: I) -> Result<(), SendError<()>>where
I: IntoIterator<Item = T>,
pub fn send_iter<I>(&self, values: I) -> Result<(), SendError<()>>where
I: IntoIterator<Item = T>,
Send multiple values.
If all receivers are dropped, SendError is returned. The values cannot be returned, as they may have been partially sent when the channel is closed.
Trait Implementations§
Source§impl<T> Clone for SyncSender<T>
impl<T> Clone for SyncSender<T>
Auto Trait Implementations§
impl<T> Freeze for SyncSender<T>
impl<T> RefUnwindSafe for SyncSender<T>
impl<T> Send for SyncSender<T>where
T: Send,
impl<T> Sync for SyncSender<T>where
T: Send,
impl<T> !Unpin for SyncSender<T>
impl<T> UnwindSafe for SyncSender<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