Struct async_graphql_actix_web::WSSubscription [−][src]
Actor for subscription via websocket
Implementations
impl<Query, Mutation, Subscription> WSSubscription<Query, Mutation, Subscription, fn(_: Value) -> Ready<Result<Data>>> where
Query: ObjectType + 'static,
Mutation: ObjectType + 'static,
Subscription: SubscriptionType + 'static,
[src][−]
Query: ObjectType + 'static,
Mutation: ObjectType + 'static,
Subscription: SubscriptionType + 'static,
pub fn start<T>(
schema: Schema<Query, Mutation, Subscription>,
request: &HttpRequest,
stream: T
) -> Result<HttpResponse, Error> where
T: Stream<Item = Result<Bytes, PayloadError>> + 'static,
[src][−]
schema: Schema<Query, Mutation, Subscription>,
request: &HttpRequest,
stream: T
) -> Result<HttpResponse, Error> where
T: Stream<Item = Result<Bytes, PayloadError>> + 'static,
Start an actor for subscription connection via websocket.
impl<Query, Mutation, Subscription, F, R> WSSubscription<Query, Mutation, Subscription, F> where
Query: ObjectType + 'static,
Mutation: ObjectType + 'static,
Subscription: SubscriptionType + 'static,
F: FnOnce(Value) -> R + Unpin + Send + 'static,
R: Future<Output = Result<Data>> + Send + 'static,
[src][−]
Query: ObjectType + 'static,
Mutation: ObjectType + 'static,
Subscription: SubscriptionType + 'static,
F: FnOnce(Value) -> R + Unpin + Send + 'static,
R: Future<Output = Result<Data>> + Send + 'static,
pub fn start_with_initializer<T>(
schema: Schema<Query, Mutation, Subscription>,
request: &HttpRequest,
stream: T,
initializer: F
) -> Result<HttpResponse, Error> where
T: Stream<Item = Result<Bytes, PayloadError>> + 'static,
F: FnOnce(Value) -> R + Unpin + Send + 'static,
R: Future<Output = Result<Data>> + Send + 'static,
[src][−]
schema: Schema<Query, Mutation, Subscription>,
request: &HttpRequest,
stream: T,
initializer: F
) -> Result<HttpResponse, Error> where
T: Stream<Item = Result<Bytes, PayloadError>> + 'static,
F: FnOnce(Value) -> R + Unpin + Send + 'static,
R: Future<Output = Result<Data>> + Send + 'static,
Start an actor for subscription connection via websocket with an initialization function.
Trait Implementations
impl<Query, Mutation, Subscription, F, R> Actor for WSSubscription<Query, Mutation, Subscription, F> where
Query: ObjectType + 'static,
Mutation: ObjectType + 'static,
Subscription: SubscriptionType + 'static,
F: FnOnce(Value) -> R + Unpin + Send + 'static,
R: Future<Output = Result<Data>> + Send + 'static,
[src][+]
Query: ObjectType + 'static,
Mutation: ObjectType + 'static,
Subscription: SubscriptionType + 'static,
F: FnOnce(Value) -> R + Unpin + Send + 'static,
R: Future<Output = Result<Data>> + Send + 'static,
impl<Query, Mutation, Subscription, F, R> StreamHandler<Result<Message, ProtocolError>> for WSSubscription<Query, Mutation, Subscription, F> where
Query: ObjectType + 'static,
Mutation: ObjectType + 'static,
Subscription: SubscriptionType + 'static,
F: FnOnce(Value) -> R + Unpin + Send + 'static,
R: Future<Output = Result<Data>> + Send + 'static,
[src][+]
Query: ObjectType + 'static,
Mutation: ObjectType + 'static,
Subscription: SubscriptionType + 'static,
F: FnOnce(Value) -> R + Unpin + Send + 'static,
R: Future<Output = Result<Data>> + Send + 'static,
Auto Trait Implementations
impl<Query, Mutation, Subscription, F> !RefUnwindSafe for WSSubscription<Query, Mutation, Subscription, F>
impl<Query, Mutation, Subscription, F> Send for WSSubscription<Query, Mutation, Subscription, F> where
F: Send,
Mutation: Send + Sync,
Query: Send + Sync,
Subscription: Send + Sync,
F: Send,
Mutation: Send + Sync,
Query: Send + Sync,
Subscription: Send + Sync,
impl<Query, Mutation, Subscription, F> Sync for WSSubscription<Query, Mutation, Subscription, F> where
F: Sync,
Mutation: Send + Sync,
Query: Send + Sync,
Subscription: Send + Sync,
F: Sync,
Mutation: Send + Sync,
Query: Send + Sync,
Subscription: Send + Sync,
impl<Query, Mutation, Subscription, F> Unpin for WSSubscription<Query, Mutation, Subscription, F> where
F: Unpin,
F: Unpin,
impl<Query, Mutation, Subscription, F> !UnwindSafe for WSSubscription<Query, Mutation, Subscription, F>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T> Instrument for T
[src][+]
impl<T> Instrument for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[+]
V: MultiLane<T>,