[][src]Trait juniper::IntoFieldResult

pub trait IntoFieldResult<T, S> {
    type Item;
    pub fn into_result(self) -> Result<T, FieldError<S>>;
}

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.

Associated Types

type Item[src]

Type of items yielded by this Stream.

Loading content...

Required methods

pub fn into_result(self) -> Result<T, FieldError<S>>[src]

Turns current Stream type into a generic Result.

Loading content...

Implementations on Foreign Types

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

type Item = T::Item

Loading content...

Implementors

impl<T, S> IntoFieldResult<T, S> for T where
    T: Stream
[src]

type Item = T::Item

Loading content...