pub struct UnboundedSender<T> { /* private fields */ }
Expand description
Send values to the associated UnboundedReceiver
.
Instances are created by the
unbounded_channel
function.
Implementations§
Source§impl<T> UnboundedSender<T>
impl<T> UnboundedSender<T>
Sourcepub fn try_send(&mut self, message: T) -> Result<(), UnboundedTrySendError<T>>
pub fn try_send(&mut self, message: T) -> Result<(), UnboundedTrySendError<T>>
Attempts to send a message on this UnboundedSender
without blocking.
Trait Implementations§
Source§impl<T> Clone for UnboundedSender<T>
impl<T> Clone for UnboundedSender<T>
Source§impl<T> Debug for UnboundedSender<T>
impl<T> Debug for UnboundedSender<T>
Source§impl<T> Sink for UnboundedSender<T>
impl<T> Sink for UnboundedSender<T>
Source§type SinkError = UnboundedSendError
type SinkError = UnboundedSendError
The type of value produced by the sink when an error occurs.
Source§fn start_send(&mut self, msg: T) -> StartSend<T, Self::SinkError>
fn start_send(&mut self, msg: T) -> StartSend<T, Self::SinkError>
Begin the process of sending a value to the sink. Read more
Source§fn poll_complete(&mut self) -> Poll<(), Self::SinkError>
fn poll_complete(&mut self) -> Poll<(), Self::SinkError>
Flush all output from this sink, if necessary. Read more
Source§fn close(&mut self) -> Poll<(), Self::SinkError>
fn close(&mut self) -> Poll<(), Self::SinkError>
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
)