[][src]Struct juniper_subscriptions::Connection

pub struct Connection<'a, S> { /* fields omitted */ }

Simple SubscriptionConnection implementation.

Resolves Value<ValuesStream> into Stream<Item = ExecutionOutput<S>> using the following logic:

Value::Null - returns Value::Null once Value::Scalar - returns Ok value or Value::Null and errors vector Value::List - resolves each stream from the list using current logic and returns values in the order received Value::Object - waits while each field of the Object is returned, then yields the whole object Value::Object<Value::Object<_>> - returns Value::Null if Value::Object consists of sub-objects

Implementations

impl<'a, S> Connection<'a, S> where
    S: ScalarValue + Send + Sync + 'a, 
[src]

pub fn from_stream(
    stream: Value<ValuesStream<'a, S>>,
    errors: Vec<ExecutionError<S>>
) -> Self
[src]

Creates new Connection from values stream and errors

Trait Implementations

impl<'a, S> Stream for Connection<'a, S> where
    S: ScalarValue + Send + Sync + 'a, 
[src]

type Item = ExecutionOutput<S>

Values yielded by the stream.

impl<'a, S> SubscriptionConnection<S> for Connection<'a, S> where
    S: ScalarValue + Send + Sync + 'a, 
[src]

Auto Trait Implementations

impl<'a, S> !RefUnwindSafe for Connection<'a, S>

impl<'a, S> Send for Connection<'a, S>

impl<'a, S> !Sync for Connection<'a, S>

impl<'a, S> Unpin for Connection<'a, S>

impl<'a, S> !UnwindSafe for Connection<'a, S>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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

type Item = <T as Stream>::Item

Type of items yielded by this Stream.

impl<T> StreamExt for T where
    T: Stream + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.