Skip to main content

ProgressItem

Trait ProgressItem 

Source
pub trait ProgressItem {
    // Required method
    fn progress_error(&self) -> Option<ErrorInfo<'_>>;
}
Expand description

Lets instrument classify items without being generic over the item type.

A T that appeared only in a where clause would be an unconstrained type parameter (E0207), and a PhantomData<T> would drag T‘s auto traits into the stream’s type, which would break any binding whose T carries no Send + 'b bound even though the method it backs promises a Send stream. reqwest-streams’ CSV reader is one such.

Required Methods§

Source

fn progress_error(&self) -> Option<ErrorInfo<'_>>

The error this item carries, if it is one.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, E> ProgressItem for Result<T, E>
where E: Error + 'static,

Covers every Result whose error is a standard error, so binding crates get this for their own error types without implementing anything.

Implementors§