[−][src]Struct byo_graphql::GraphqlClient
A client that you may reuse to do several queries
Implementations
impl GraphqlClient
[src]
pub fn new<S: Into<String>>(url: S) -> ByoResult<Self>
[src]
create a client
pub fn set_bearer_auth<S: Into<String>>(&mut self, auth: S)
[src]
specify the optional authentication token which will be used in all requests
pub fn raw<S: Into<String>>(&self, query: S) -> ByoResult<Response>
[src]
return a raw reqwest Response. You should usually not need this function
pub fn text<S: Into<String>>(&self, query: S) -> ByoResult<String>
[src]
get the server's answer as unparsed text. This is mainly useful to debug and tune your structures or query
pub fn get_data<S: Into<String>, Data: DeserializeOwned>(
&self,
query: S
) -> ByoResult<Data>
[src]
&self,
query: S
) -> ByoResult<Data>
get the data
part of the answer in the desired type
(it usually looks like a map)
pub fn get_first_item<S: Into<String>, Item: DeserializeOwned>(
&self,
query: S
) -> ByoResult<Item>
[src]
&self,
query: S
) -> ByoResult<Item>
get the first item in the answer, if present. This is a convenience method for the simplest case, most especially for when you query a unique item.
Auto Trait Implementations
impl !RefUnwindSafe for GraphqlClient
[src]
impl Send for GraphqlClient
[src]
impl Sync for GraphqlClient
[src]
impl Unpin for GraphqlClient
[src]
impl !UnwindSafe for GraphqlClient
[src]
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> 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, 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>,