pub struct Coordinator<'a, QueryT, MutationT, SubscriptionT, CtxT, S>
where QueryT: GraphQLTypeAsync<S, Context = CtxT> + Send, QueryT::TypeInfo: Send + Sync, MutationT: GraphQLTypeAsync<S, Context = CtxT> + Send, MutationT::TypeInfo: Send + Sync, SubscriptionT: GraphQLSubscriptionType<S, Context = CtxT> + Send, SubscriptionT::TypeInfo: Send + Sync, CtxT: Sync, S: ScalarValue + Send + Sync,
{ /* private fields */ }
Expand description

Simple SubscriptionCoordinator implementation:

  • contains the schema
  • handles subscription start

Implementations§

source§

impl<'a, QueryT, MutationT, SubscriptionT, CtxT, S> Coordinator<'a, QueryT, MutationT, SubscriptionT, CtxT, S>
where QueryT: GraphQLTypeAsync<S, Context = CtxT> + Send, QueryT::TypeInfo: Send + Sync, MutationT: GraphQLTypeAsync<S, Context = CtxT> + Send, MutationT::TypeInfo: Send + Sync, SubscriptionT: GraphQLSubscriptionType<S, Context = CtxT> + Send, SubscriptionT::TypeInfo: Send + Sync, CtxT: Sync, S: ScalarValue + Send + Sync,

source

pub fn new(root_node: RootNode<'a, QueryT, MutationT, SubscriptionT, S>) -> Self

Builds new Coordinator with specified root_node

Trait Implementations§

source§

impl<'a, QueryT, MutationT, SubscriptionT, CtxT, S> SubscriptionCoordinator<'a, CtxT, S> for Coordinator<'a, QueryT, MutationT, SubscriptionT, CtxT, S>
where QueryT: GraphQLTypeAsync<S, Context = CtxT> + Send, QueryT::TypeInfo: Send + Sync, MutationT: GraphQLTypeAsync<S, Context = CtxT> + Send, MutationT::TypeInfo: Send + Sync, SubscriptionT: GraphQLSubscriptionType<S, Context = CtxT> + Send, SubscriptionT::TypeInfo: Send + Sync, CtxT: Sync, S: ScalarValue + Send + Sync + 'a,

§

type Connection = Connection<'a, S>

§

type Error = GraphQLError

Type of error while trying to spawn SubscriptionConnection
source§

fn subscribe( &'a self, req: &'a GraphQLRequest<S>, context: &'a CtxT ) -> BoxFuture<'a, Result<Self::Connection, Self::Error>>

Auto Trait Implementations§

§

impl<'a, QueryT, MutationT, SubscriptionT, CtxT, S> Freeze for Coordinator<'a, QueryT, MutationT, SubscriptionT, CtxT, S>
where MutationT: Freeze, QueryT: Freeze, SubscriptionT: Freeze, <MutationT as GraphQLValue<S>>::TypeInfo: Freeze, <QueryT as GraphQLValue<S>>::TypeInfo: Freeze, <SubscriptionT as GraphQLValue<S>>::TypeInfo: Freeze,

§

impl<'a, QueryT, MutationT, SubscriptionT, CtxT, S> RefUnwindSafe for Coordinator<'a, QueryT, MutationT, SubscriptionT, CtxT, S>
where MutationT: RefUnwindSafe, QueryT: RefUnwindSafe, S: RefUnwindSafe, SubscriptionT: RefUnwindSafe, <MutationT as GraphQLValue<S>>::TypeInfo: RefUnwindSafe, <QueryT as GraphQLValue<S>>::TypeInfo: RefUnwindSafe, <SubscriptionT as GraphQLValue<S>>::TypeInfo: RefUnwindSafe,

§

impl<'a, QueryT, MutationT, SubscriptionT, CtxT, S> Send for Coordinator<'a, QueryT, MutationT, SubscriptionT, CtxT, S>

§

impl<'a, QueryT, MutationT, SubscriptionT, CtxT, S> Sync for Coordinator<'a, QueryT, MutationT, SubscriptionT, CtxT, S>

§

impl<'a, QueryT, MutationT, SubscriptionT, CtxT, S> Unpin for Coordinator<'a, QueryT, MutationT, SubscriptionT, CtxT, S>
where MutationT: Unpin, QueryT: Unpin, S: Unpin, SubscriptionT: Unpin, <MutationT as GraphQLValue<S>>::TypeInfo: Unpin, <QueryT as GraphQLValue<S>>::TypeInfo: Unpin, <SubscriptionT as GraphQLValue<S>>::TypeInfo: Unpin,

§

impl<'a, QueryT, MutationT, SubscriptionT, CtxT, S> UnwindSafe for Coordinator<'a, QueryT, MutationT, SubscriptionT, CtxT, S>
where MutationT: UnwindSafe, QueryT: UnwindSafe, S: UnwindSafe, SubscriptionT: UnwindSafe, <MutationT as GraphQLValue<S>>::TypeInfo: UnwindSafe, <QueryT as GraphQLValue<S>>::TypeInfo: UnwindSafe, <SubscriptionT as GraphQLValue<S>>::TypeInfo: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.