pub enum CaducusErrorKind<T = ()> {
InvalidArgument,
InvalidTTL(T),
InvalidPattern(T),
NoRuntime,
Timeout,
Shutdown(T),
Full(T),
}Expand description
Error kinds for the public Caducus API.
The default type parameter () is used by non-send error paths (receive,
config, construction). The send path uses CaducusErrorKind<T> so that
Full and Shutdown carry the rejected item back to the caller.
Variants§
InvalidArgument
A configuration value was outside the supported range, such as a TTL of zero.
InvalidTTL(T)
A per-send TTL or deadline was invalid. Carries the rejected item.
InvalidPattern(T)
The wrong send variant was used for the configured channel mode. Carries the rejected item.
NoRuntime
build() was called without a Tokio runtime available.
Timeout
A receive operation reached its deadline without producing an item.
Shutdown(T)
The channel has been shut down. On the send path this carries the
rejected item; on the receive path the parameter is ().
Full(T)
The buffer is at capacity. Carries the rejected item.
Trait Implementations§
Source§impl<T: Clone> Clone for CaducusErrorKind<T>
impl<T: Clone> Clone for CaducusErrorKind<T>
Source§fn clone(&self) -> CaducusErrorKind<T>
fn clone(&self) -> CaducusErrorKind<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T: Debug> Debug for CaducusErrorKind<T>
impl<T: Debug> Debug for CaducusErrorKind<T>
Source§impl<T: PartialEq> PartialEq for CaducusErrorKind<T>
impl<T: PartialEq> PartialEq for CaducusErrorKind<T>
Source§fn eq(&self, other: &CaducusErrorKind<T>) -> bool
fn eq(&self, other: &CaducusErrorKind<T>) -> bool
self and other values to be equal, and is used by ==.