Struct glimesh::Client [−][src]
pub struct Client<T, E> { /* fields omitted */ }
Expand description
Glimesh client. The client is generic over its connection/transport, meaning it can be used with http or websockets (or any future transport Glimesh might support).
To create a client you first create the underlying connection/transport,
such as crate::http::Connection
.
Implementations
impl<T, E> Client<T, E>
[src]
impl<T, E> Client<T, E>
[src]pub fn new(conn: T) -> Self
[src]
pub fn new(conn: T) -> Self
[src]Create a new client from a connection. Prefer calling into_client
on the connection itself.
pub fn into_connection(self) -> T
[src]
pub fn into_connection(self) -> T
[src]Turn this client back into its underlying connection
impl<T, E> Client<T, E> where
T: QueryConn<Error = E>,
[src]
impl<T, E> Client<T, E> where
T: QueryConn<Error = E>,
[src]pub async fn query<Q>(
&self,
variables: Q::Variables
) -> Result<Q::ResponseData, E> where
Q: GraphQLQuery,
Q::Variables: Send + Sync,
[src]
pub async fn query<Q>(
&self,
variables: Q::Variables
) -> Result<Q::ResponseData, E> where
Q: GraphQLQuery,
Q::Variables: Send + Sync,
[src]Perform a graphql query using the underlying connection.
Errors
See QueryConn::query
for error information
impl<T, E> Client<T, E> where
T: MutationConn<Error = E>,
[src]
impl<T, E> Client<T, E> where
T: MutationConn<Error = E>,
[src]pub async fn mutate<Q>(
&self,
variables: Q::Variables
) -> Result<Q::ResponseData, E> where
Q: GraphQLQuery,
Q::Variables: Send + Sync,
[src]
pub async fn mutate<Q>(
&self,
variables: Q::Variables
) -> Result<Q::ResponseData, E> where
Q: GraphQLQuery,
Q::Variables: Send + Sync,
[src]Perform a graphql mutation using the underlying connection
Errors
See MutationConn::mutate
for error information
impl<T, E> Client<T, E> where
T: SubscriptionConn<Error = E>,
[src]
impl<T, E> Client<T, E> where
T: SubscriptionConn<Error = E>,
[src]pub async fn subscribe<'a, Q>(
&self,
variables: Q::Variables
) -> Result<BoxStream<'a, Q::ResponseData>, E> where
Q: GraphQLQuery,
Q::Variables: Send + Sync,
[src]
pub async fn subscribe<'a, Q>(
&self,
variables: Q::Variables
) -> Result<BoxStream<'a, Q::ResponseData>, E> where
Q: GraphQLQuery,
Q::Variables: Send + Sync,
[src]Subscribe to a graphql subcription using the underlying connection.
Errors
See SubscriptionConn::subscribe
for error information
Trait Implementations
Auto Trait Implementations
impl<T, E> RefUnwindSafe for Client<T, E> where
E: RefUnwindSafe,
T: RefUnwindSafe,
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, E> Send for Client<T, E> where
E: Send,
T: Send,
E: Send,
T: Send,
impl<T, E> Sync for Client<T, E> where
E: Sync,
T: Sync,
E: Sync,
T: Sync,
impl<T, E> Unpin for Client<T, E> where
E: Unpin,
T: Unpin,
E: Unpin,
T: Unpin,
impl<T, E> UnwindSafe for Client<T, E> where
E: UnwindSafe,
T: UnwindSafe,
E: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,