[−][src]Struct flume::Sender
A transmitting end of a channel.
Implementations
impl<T> Sender<T>
[src]
pub fn sink(&self) -> SenderSink<T>
[src]
impl<T> Sender<T>
[src]
pub fn send(&self, msg: T) -> Result<(), SendError<T>>
[src]
Send a value into the channel, returning an error if the channel receiver has been dropped. If the channel is bounded and is full, this method will block.
pub fn try_send(&self, msg: T) -> Result<(), TrySendError<T>>
[src]
Attempt to send a value into the channel. If the channel is bounded and full, or the
receiver has been dropped, an error is returned. If the channel associated with this
sender is unbounded, this method has the same behaviour as Sender::send
.
impl<T: Unpin> Sender<T>
[src]
pub fn send_async(&self, msg: T) -> SendFuture<T>ⓘImportant traits for SendFuture<'a, T>
impl<'a, T: Unpin> Future for SendFuture<'a, T> type Output = Result<(), Disconnected>;
[src]
Important traits for SendFuture<'a, T>
impl<'a, T: Unpin> Future for SendFuture<'a, T> type Output = Result<(), Disconnected>;
Create a future that may be used to send asynchronously a value to a channel, without blocking to wait for space or to acquire the lock.
Trait Implementations
impl<T> Clone for Sender<T>
[src]
fn clone(&self) -> Self
[src]
Clone this sender. Sender
acts as a handle to a channel, and the channel will only be
cleaned up when all senders and the receiver have been dropped.
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Debug for Sender<T>
[src]
impl<T> Drop for Sender<T>
[src]
Auto Trait Implementations
impl<T> !RefUnwindSafe for Sender<T>
impl<T> Send for Sender<T> where
T: Send,
T: Send,
impl<T> !Sync for Sender<T>
impl<T> Unpin for Sender<T>
impl<T> !UnwindSafe for Sender<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,