Struct glimesh::Client [−][src]
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]
pub fn new(conn: T) -> Self
[src]
Create a new client from a connection. Prefer calling into_client
on the connection itself.
impl<T, E> Client<T, E> where
T: QueryConn<Error = E>,
[src]
T: QueryConn<Error = E>,
pub async fn query<Q>(
&self,
variables: Q::Variables
) -> Result<Q::ResponseData, E> where
Q: GraphQLQuery,
Q::Variables: Send + Sync,
[src]
&self,
variables: Q::Variables
) -> Result<Q::ResponseData, E> where
Q: GraphQLQuery,
Q::Variables: Send + Sync,
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]
T: MutationConn<Error = E>,
pub async fn mutate<Q>(
&self,
variables: Q::Variables
) -> Result<Q::ResponseData, E> where
Q: GraphQLQuery,
Q::Variables: Send + Sync,
[src]
&self,
variables: Q::Variables
) -> Result<Q::ResponseData, E> where
Q: GraphQLQuery,
Q::Variables: Send + Sync,
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]
T: SubscriptionConn<Error = E>,
pub async fn subscribe<Q>(
&self,
variables: Q::Variables
) -> Result<BoxStream<'_, Q::ResponseData>, E> where
Q: GraphQLQuery,
Q::Variables: Send + Sync,
[src]
&self,
variables: Q::Variables
) -> Result<BoxStream<'_, Q::ResponseData>, E> where
Q: GraphQLQuery,
Q::Variables: Send + Sync,
Subscribe to a graphql subcription using the underlying connection.
Errors
See SubscriptionConn::subscribe
for error information
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> 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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[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>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,