pub struct SimpleClient { /* private fields */ }
Implementations§
Source§impl SimpleClient
impl SimpleClient
pub fn new<S: Into<String>>(base_url: S) -> Self
pub async fn execute( &self, query: String, headers: Vec<(HeaderName, HeaderValue)>, ) -> Result<Value, ClientError>
pub async fn execute_to_graphql( &self, query: String, get_usage: bool, variables: Vec<GraphqlQueryVariable>, headers: Vec<(HeaderName, HeaderValue)>, ) -> Result<GraphqlResponse, ClientError>
pub async fn execute_mutation_to_graphql( &self, mutation: String, variables: Vec<GraphqlQueryVariable>, ) -> Result<GraphqlResponse, ClientError>
Sourcepub async fn ping(&self) -> Result<(), ClientError>
pub async fn ping(&self) -> Result<(), ClientError>
Send a request to the GraphQL server to check if it is alive.
pub fn url(&self) -> String
Trait Implementations§
Source§impl Clone for SimpleClient
impl Clone for SimpleClient
Source§fn clone(&self) -> SimpleClient
fn clone(&self) -> SimpleClient
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for SimpleClient
impl !RefUnwindSafe for SimpleClient
impl Send for SimpleClient
impl Sync for SimpleClient
impl Unpin for SimpleClient
impl !UnwindSafe for SimpleClient
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