pub struct SubscriptionClient { /* private fields */ }Expand description
A single SubscriptionClient enables subscription multiplexing.
Implementations§
source§impl SubscriptionClient
impl SubscriptionClient
sourcepub fn new(tx: UnboundedSender<Payload>, rx: UnboundedReceiver<Payload>) -> Self
pub fn new(tx: UnboundedSender<Payload>, rx: UnboundedReceiver<Payload>) -> Self
Create a new subscription client.
tx is a channel for sending Payloads to the GraphQL server;
rx is a channel for Payload back.
sourcepub fn start<T>(
&self,
request_body: &QueryBody<T::Variables>
) -> BoxedSubscription<T>where
T: GraphQLQuery + Send + Sync,
<T as GraphQLQuery>::ResponseData: Unpin + Send + Sync + 'static,
pub fn start<T>(
&self,
request_body: &QueryBody<T::Variables>
) -> BoxedSubscription<T>where
T: GraphQLQuery + Send + Sync,
<T as GraphQLQuery>::ResponseData: Unpin + Send + Sync + 'static,
Start a new subscription request.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SubscriptionClient
impl Send for SubscriptionClient
impl Sync for SubscriptionClient
impl Unpin for SubscriptionClient
impl !UnwindSafe for SubscriptionClient
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