pub trait IntoFieldResult<T, S> {
    type Item;

    // Required method
    fn into_result(self) -> Result<T, FieldError<S>>;
}
Expand description

Trait for wrapping Stream into Ok if it’s not Result.

Used in subscription macros when user can provide type alias for Stream or Result<Stream, _> and then a function on Stream should be called.

Required Associated Types§

source

type Item

Type of items yielded by this Stream.

Required Methods§

source

fn into_result(self) -> Result<T, FieldError<S>>

Turns current Stream type into a generic Result.

Implementations on Foreign Types§

source§

impl<T, E, S> IntoFieldResult<T, S> for Result<T, E>
where T: IntoFieldResult<T, S>, E: IntoFieldError<S>,

§

type Item = <T as IntoFieldResult<T, S>>::Item

source§

fn into_result(self) -> Result<T, FieldError<S>>

Implementors§

source§

impl<T, S> IntoFieldResult<T, S> for T
where T: Stream,

§

type Item = <T as Stream>::Item