Struct juniper_subscriptions::Coordinator
source · 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,
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,
sourcepub fn new(root_node: RootNode<'a, QueryT, MutationT, SubscriptionT, S>) -> Self
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,
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 Connection = Connection<'a, S>
Type of
SubscriptionConnection
s this SubscriptionCoordinator
returns§type Error = GraphQLError
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>>
fn subscribe( &'a self, req: &'a GraphQLRequest<S>, context: &'a CtxT ) -> BoxFuture<'a, Result<Self::Connection, Self::Error>>
Return
SubscriptionConnection
based on given GraphQLRequest
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more