Struct grafix_toolbox::uses::sync::Sender [−][src]
pub struct Sender<T> { /* fields omitted */ }Expand description
A transmitting end of a channel.
Implementations
Asynchronously send a value into the channel, returning an error if all receivers have been dropped. If the channel is bounded and is full, the returned future will yield to the async runtime.
In the current implementation, the returned future will not yield to the async runtime if the channel is unbounded. This may change in later versions.
Convert this sender into a future that asynchronously sends a single message into the channel, returning an error if all receivers have been dropped. If the channel is bounded and is full, this future will yield to the async runtime.
In the current implementation, the returned future will not yield to the async runtime if the channel is unbounded. This may change in later versions.
Create an asynchronous sink that uses this sender to asynchronously send messages into the channel. The sender will continue to be usable after the sink has been dropped.
In the current implementation, the returned sink will not yield to the async runtime if the channel is unbounded. This may change in later versions.
Attempt to send a value into the channel. If the channel is bounded and full, or all
receivers have been dropped, an error is returned. If the channel associated with this
sender is unbounded, this method has the same behaviour as Sender::send.
Send a value into the channel, returning an error if all receivers have been dropped. If the channel is bounded and is full, this method will block until space is available or all receivers have been dropped. If the channel is unbounded, this method will not block.
Send a value into the channel, returning an error if all receivers have been dropped or the deadline has passed. If the channel is bounded and is full, this method will block until space is available, the deadline is reached, or all receivers have been dropped.
Send a value into the channel, returning an error if all receivers have been dropped or the timeout has expired. If the channel is bounded and is full, this method will block until space is available, the timeout has expired, or all receivers have been dropped.
Returns true if all receivers for this channel have been dropped.
Returns true if the channel is empty. Note: Zero-capacity channels are always empty.
Returns true if the channel is full. Note: Zero-capacity channels are always full.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for Sender<T>impl<T> !UnwindSafe for Sender<T>Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = TShould always be Self
The inverse inclusion map: attempts to construct self from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> boolChecks if self is actually part of its subset T (and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SSUse with care! Same as self.to_subset but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SPThe inclusion map: converts self to the equivalent element of its superset.
pub fn vzip(self) -> V