TrySendError in std::sync::mpsc - Rust (original) (raw)

Enum TrySendError

1.0.0 · Source

pub enum TrySendError<T> {
    Full(T),
    Disconnected(T),
}

Expand description

This enumeration is the list of the possible error outcomes for thetry_send method.

§1.0.0

The data could not be sent on the sync_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.

§1.0.0

This sync_channel’s receiving half has disconnected, so the data could not be sent. The data is returned back to the callee in this case.

1.0.0 · Source§

1.0.0 · Source§

1.0.0 · Source§

1.0.0 · Source§

Source§

👎Deprecated since 1.42.0: use the Display impl or to_string()

1.30.0 · Source§

Returns the lower-level source of this error, if any. Read more

1.0.0 · Source§

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting

Source§

🔬This is a nightly-only experimental API. (error_generic_member_access #99301)

Provides type-based access to context intended for error reports. Read more

1.24.0 · Source§

Source§

Converts a SendError<T> into a TrySendError<T>.

This conversion always returns a TrySendError::Disconnected containing the data in the SendError<T>.

No data is allocated on the heap.

1.0.0 · Source§

Source§

Tests for self and other values to be equal, and is used by ==.

1.0.0 · Source§

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

1.0.0 · Source§

1.0.0 · Source§

1.0.0 · Source§