pub struct Connection { /* private fields */ }Expand description
Connect to glimesh over websockets
Implementations§
Source§impl Connection
impl Connection
Sourcepub fn builder() -> ConnectionBuilder
pub fn builder() -> ConnectionBuilder
Create a ConnectionBuilder to configure various options.
Sourcepub async fn connect(auth: Auth) -> Result<Self, WebsocketConnectionError>
pub async fn connect(auth: Auth) -> Result<Self, WebsocketConnectionError>
Create a connection with the default options.
Sourcepub fn to_client(&self) -> WebsocketClient
pub fn to_client(&self) -> WebsocketClient
Create a client with a clone of this connection
Sourcepub fn into_client(self) -> WebsocketClient
pub fn into_client(self) -> WebsocketClient
Convert this connection into a client
Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Connection
impl Debug for Connection
Source§impl MutationConn for Connection
impl MutationConn for Connection
Source§type Error = WebsocketConnectionError
type Error = WebsocketConnectionError
Error type representing any errors that can occurr when mutating
Source§fn mutate<'life0, 'async_trait, Q>(
&'life0 self,
variables: Q::Variables,
) -> Pin<Box<dyn Future<Output = Result<Q::ResponseData, Self::Error>> + Send + 'async_trait>>where
Q: GraphQLQuery + 'async_trait,
Q::Variables: Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
fn mutate<'life0, 'async_trait, Q>(
&'life0 self,
variables: Q::Variables,
) -> Pin<Box<dyn Future<Output = Result<Q::ResponseData, Self::Error>> + Send + 'async_trait>>where
Q: GraphQLQuery + 'async_trait,
Q::Variables: Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
Send a graphql mutation over this connection. Read more
Source§impl QueryConn for Connection
impl QueryConn for Connection
Source§type Error = WebsocketConnectionError
type Error = WebsocketConnectionError
Error type representing any errors that can occurr when querying
Source§fn query<'life0, 'async_trait, Q>(
&'life0 self,
variables: Q::Variables,
) -> Pin<Box<dyn Future<Output = Result<Q::ResponseData, Self::Error>> + Send + 'async_trait>>where
Q: GraphQLQuery + 'async_trait,
Q::Variables: Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
fn query<'life0, 'async_trait, Q>(
&'life0 self,
variables: Q::Variables,
) -> Pin<Box<dyn Future<Output = Result<Q::ResponseData, Self::Error>> + Send + 'async_trait>>where
Q: GraphQLQuery + 'async_trait,
Q::Variables: Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
Send a graphql query over this connection. Read more
Source§impl SubscriptionConn for Connection
impl SubscriptionConn for Connection
Source§type Error = WebsocketConnectionError
type Error = WebsocketConnectionError
Error type representing any errors that can occurr when subscribing
Source§fn subscribe<'life0, 'async_trait, Q>(
&'life0 self,
variables: Q::Variables,
) -> Pin<Box<dyn Future<Output = Result<Subscription<Q::ResponseData>, Self::Error>> + Send + 'async_trait>>where
Q: GraphQLQuery + 'async_trait,
Q::Variables: Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe<'life0, 'async_trait, Q>(
&'life0 self,
variables: Q::Variables,
) -> Pin<Box<dyn Future<Output = Result<Subscription<Q::ResponseData>, Self::Error>> + Send + 'async_trait>>where
Q: GraphQLQuery + 'async_trait,
Q::Variables: Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
Send a graphql subscription over this connection.
The future will resolve when the subscription has been established,
and then any messages will be sent on the returned stream Read more
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
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