pub struct UnboundedSender<T>(/* private fields */);
Expand description
The transmission end of a channel which is used to send values.
This is created by the unbounded
method.
Implementations§
Source§impl<T> UnboundedSender<T>
impl<T> UnboundedSender<T>
Sourcepub fn unbounded_send(&self, msg: T) -> Result<(), SendError<T>>
pub fn unbounded_send(&self, msg: T) -> Result<(), SendError<T>>
Sends the provided message along this channel.
This is an unbounded sender, so this function differs from Sink::send
by ensuring the return type reflects that the channel is always ready to
receive messages.
Trait Implementations§
Source§impl<T> Clone for UnboundedSender<T>
impl<T> Clone for UnboundedSender<T>
Source§fn clone(&self) -> UnboundedSender<T>
fn clone(&self) -> UnboundedSender<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for UnboundedSender<T>
impl<T: Debug> Debug for UnboundedSender<T>
Source§impl<'a, T> Sink for &'a UnboundedSender<T>
impl<'a, T> Sink for &'a UnboundedSender<T>
Source§fn start_send(&mut self, msg: T) -> StartSend<T, SendError<T>>
fn start_send(&mut self, msg: T) -> StartSend<T, SendError<T>>
Begin the process of sending a value to the sink. Read more
Source§fn poll_complete(&mut self) -> Poll<(), SendError<T>>
fn poll_complete(&mut self) -> Poll<(), SendError<T>>
Flush all output from this sink, if necessary. Read more
Source§fn close(&mut self) -> Poll<(), SendError<T>>
fn close(&mut self) -> Poll<(), SendError<T>>
A method to indicate that no more values will ever be pushed into this
sink. Read more
Source§fn wait(self) -> Wait<Self>where
Self: Sized,
fn wait(self) -> Wait<Self>where
Self: Sized,
Creates a new object which will produce a synchronous sink. Read more
Source§fn with<U, F, Fut>(self, f: F) -> With<Self, U, F, Fut>where
F: FnMut(U) -> Fut,
Fut: IntoFuture<Item = Self::SinkItem>,
<Fut as IntoFuture>::Error: From<Self::SinkError>,
Self: Sized,
fn with<U, F, Fut>(self, f: F) -> With<Self, U, F, Fut>where
F: FnMut(U) -> Fut,
Fut: IntoFuture<Item = Self::SinkItem>,
<Fut as IntoFuture>::Error: From<Self::SinkError>,
Self: Sized,
Composes a function in front of the sink. Read more
Source§fn with_flat_map<U, F, St>(self, f: F) -> WithFlatMap<Self, U, F, St>
fn with_flat_map<U, F, St>(self, f: F) -> WithFlatMap<Self, U, F, St>
Composes a function in front of the sink. Read more
Source§fn sink_map_err<F, E>(self, f: F) -> SinkMapErr<Self, F>
fn sink_map_err<F, E>(self, f: F) -> SinkMapErr<Self, F>
Transforms the error returned by the sink.
Source§fn sink_from_err<E>(self) -> SinkFromErr<Self, E>
fn sink_from_err<E>(self) -> SinkFromErr<Self, E>
Map this sink’s error to any error implementing
From
for this sink’s
Error
, returning a new sink. Read moreSource§fn buffer(self, amt: usize) -> Buffer<Self>where
Self: Sized,
fn buffer(self, amt: usize) -> Buffer<Self>where
Self: Sized,
Adds a fixed-size buffer to the current sink. Read more
Source§fn flush(self) -> Flush<Self>where
Self: Sized,
fn flush(self) -> Flush<Self>where
Self: Sized,
A future that completes when the sink has finished processing all
pending requests. Read more
Source§impl<T> Sink for UnboundedSender<T>
impl<T> Sink for UnboundedSender<T>
Source§fn start_send(&mut self, msg: T) -> StartSend<T, SendError<T>>
fn start_send(&mut self, msg: T) -> StartSend<T, SendError<T>>
Begin the process of sending a value to the sink. Read more
Source§fn poll_complete(&mut self) -> Poll<(), SendError<T>>
fn poll_complete(&mut self) -> Poll<(), SendError<T>>
Flush all output from this sink, if necessary. Read more
Source§fn close(&mut self) -> Poll<(), SendError<T>>
fn close(&mut self) -> Poll<(), SendError<T>>
A method to indicate that no more values will ever be pushed into this
sink. Read more
Source§fn wait(self) -> Wait<Self>where
Self: Sized,
fn wait(self) -> Wait<Self>where
Self: Sized,
Creates a new object which will produce a synchronous sink. Read more
Source§fn with<U, F, Fut>(self, f: F) -> With<Self, U, F, Fut>where
F: FnMut(U) -> Fut,
Fut: IntoFuture<Item = Self::SinkItem>,
<Fut as IntoFuture>::Error: From<Self::SinkError>,
Self: Sized,
fn with<U, F, Fut>(self, f: F) -> With<Self, U, F, Fut>where
F: FnMut(U) -> Fut,
Fut: IntoFuture<Item = Self::SinkItem>,
<Fut as IntoFuture>::Error: From<Self::SinkError>,
Self: Sized,
Composes a function in front of the sink. Read more
Source§fn with_flat_map<U, F, St>(self, f: F) -> WithFlatMap<Self, U, F, St>
fn with_flat_map<U, F, St>(self, f: F) -> WithFlatMap<Self, U, F, St>
Composes a function in front of the sink. Read more
Source§fn sink_map_err<F, E>(self, f: F) -> SinkMapErr<Self, F>
fn sink_map_err<F, E>(self, f: F) -> SinkMapErr<Self, F>
Transforms the error returned by the sink.
Source§fn sink_from_err<E>(self) -> SinkFromErr<Self, E>
fn sink_from_err<E>(self) -> SinkFromErr<Self, E>
Map this sink’s error to any error implementing
From
for this sink’s
Error
, returning a new sink. Read moreSource§fn buffer(self, amt: usize) -> Buffer<Self>where
Self: Sized,
fn buffer(self, amt: usize) -> Buffer<Self>where
Self: Sized,
Adds a fixed-size buffer to the current sink. Read more
Source§fn flush(self) -> Flush<Self>where
Self: Sized,
fn flush(self) -> Flush<Self>where
Self: Sized,
A future that completes when the sink has finished processing all
pending requests. Read more
Auto Trait Implementations§
impl<T> Freeze for UnboundedSender<T>
impl<T> !RefUnwindSafe for UnboundedSender<T>
impl<T> Send for UnboundedSender<T>where
T: Send,
impl<T> Sync for UnboundedSender<T>where
T: Send,
impl<T> Unpin for UnboundedSender<T>
impl<T> !UnwindSafe for UnboundedSender<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)