Type Alias sophia_api::source::StreamResult

source ·
pub type StreamResult<T, E1, E2> = Result<T, StreamError<E1, E2>>;
Expand description

Convenient type alias for Result whose error is StreamError.

Aliased Type§

enum StreamResult<T, E1, E2> {
    Ok(T),
    Err(StreamError<E1, E2>),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(StreamError<E1, E2>)

Contains the error value

Trait Implementations§

source§

impl<T, E1, E2> StreamResultExt<T, E1, E2> for StreamResult<T, E1, E2>
where E1: Error, E2: Error,

source§

fn map_source_err<E, F>(self, f: F) -> StreamResult<T, E, E2>
where E: Error, F: FnOnce(E1) -> E,

Map the error if it is a SourceError
source§

fn map_sink_err<E, F>(self, f: F) -> StreamResult<T, E1, E>
where E: Error, F: FnOnce(E2) -> E,

Map the error if it is a SinkError