pub trait StreamResultExt<T, E1, E2>{
// Required methods
fn map_source_err<E, F>(self, f: F) -> StreamResult<T, E, E2>
where E: Error,
F: FnOnce(E1) -> E;
fn map_sink_err<E, F>(self, f: F) -> StreamResult<T, E1, E>
where E: Error,
F: FnOnce(E2) -> E;
}
Expand description
Additional methods for StreamResult
Required Methods§
Sourcefn map_source_err<E, F>(self, f: F) -> StreamResult<T, E, E2>
fn map_source_err<E, F>(self, f: F) -> StreamResult<T, E, E2>
Map the error if it is a SourceError
Sourcefn map_sink_err<E, F>(self, f: F) -> StreamResult<T, E1, E>
fn map_sink_err<E, F>(self, f: F) -> StreamResult<T, E1, E>
Map the error if it is a SinkError
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.