Enum std::comm::TrySendResult
pub enum TrySendResult<T> { Sent, Full(T), RecvDisconnected(T), }
This enumeration is the list of the possible outcomes for the
SyncSender::try_send
method.
Variants
Sent | The data was successfully sent along the channel. This either means that it was buffered in the channel, or handed off to a receiver. In either case, the callee no longer has ownership of the data. |
Full | The data could not be sent on the channel because it would require that the callee block to send the data. If this is a buffered channel, then the buffer is full at this time. If this is not a buffered channel, then there is no receiver available to acquire the data. |
RecvDisconnected | This channel's receiving half has disconnected, so the data could not be sent. The data is returned back to the callee in this case. |
Trait Implementations
Derived Implementations
impl<T: Show> Show for TrySendResult<T>
impl<T: Clone> Clone for TrySendResult<T>
fn clone(&self) -> TrySendResult<T>
Returns a copy of the value. The contents of owned pointers are copied to maintain uniqueness, while the contents of managed pointers are not copied.
fn clone_from(&mut self, source: &Self)
Perform copy-assignment from source
.
a.clone_from(&b)
is equivalent to a = b.clone()
in functionality,
but can be overridden to reuse the resources of a
to avoid unnecessary
allocations.