Trait glimesh::SubscriptionConn[][src]

pub trait SubscriptionConn {
#[must_use]    fn subscribe<'life0, 'async_trait, Q>(
        &'life0 self,
        variables: Q::Variables,
        sender: Sender<Q::ResponseData>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        Q: GraphQLQuery,
        Q::Variables: Send + Sync,
        Q: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
; }

Connections that implement this support graphql subscriptions.

Required methods

#[must_use]fn subscribe<'life0, 'async_trait, Q>(
    &'life0 self,
    variables: Q::Variables,
    sender: Sender<Q::ResponseData>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    Q: GraphQLQuery,
    Q::Variables: Send + Sync,
    Q: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Send a graphql subscription over this connection. The future will resolve when the subscription has been established, and then any messages will be sent to the passed in mpsc Sender.

Errors

This function may error if there was a problem with the underlying connection such as a dns resolution error, or the websocket is disconnected, or if the api returned an error or the api response failed to decode.

Loading content...

Implementors

Loading content...