pub enum TryProduceError<T> {
Full(T),
Closed(T),
}Expand description
Non-blocking push error — carries the rejected value back to the caller.
Returned by Producer::try_produce.
Both variants own the value so the caller can retry, escalate, or drop it.
Variants§
Full(T)
Buffer is at capacity and configured not to overwrite. Transient.
Closed(T)
Buffer / record has been torn down (e.g. shutdown). Terminal.
Trait Implementations§
Source§impl<T: Debug> Debug for TryProduceError<T>
impl<T: Debug> Debug for TryProduceError<T>
Source§impl<T> Display for TryProduceError<T>
impl<T> Display for TryProduceError<T>
Source§impl<T: Debug> Error for TryProduceError<T>
Available on crate feature std only.
impl<T: Debug> Error for TryProduceError<T>
Available on crate feature
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl<T> Freeze for TryProduceError<T>where
T: Freeze,
impl<T> RefUnwindSafe for TryProduceError<T>where
T: RefUnwindSafe,
impl<T> Send for TryProduceError<T>where
T: Send,
impl<T> Sync for TryProduceError<T>where
T: Sync,
impl<T> Unpin for TryProduceError<T>where
T: Unpin,
impl<T> UnsafeUnpin for TryProduceError<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for TryProduceError<T>where
T: UnwindSafe,
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