pub struct IntrospectionResponse { /* private fields */ }Expand description
If batch_introspect succeeds, it returns a Vec<IntrospectionResponse>.
IntrospectionResponse contains data, and a vec of eventual errors.
Implementations§
Source§impl IntrospectionResponse
In some (rare) cases, executing a GraphQL query can return both errors and data.
impl IntrospectionResponse
In some (rare) cases, executing a GraphQL query can return both errors and data.
This impl allows you to turn it into either data or errors, or get a reference to both.
Sourcepub fn data(&self) -> Option<&Value>
pub fn data(&self) -> Option<&Value>
data returns a reference to the underlying data
use into_result if you don’t want to use both data and errors.
Sourcepub fn errors(&self) -> Option<&Vec<IntrospectionError>>
pub fn errors(&self) -> Option<&Vec<IntrospectionError>>
errors returns a reference to the underlying errors
use into_result if you don’t want to use both data and errors.
Sourcepub fn into_result(self) -> Result<Value, Vec<IntrospectionError>>
pub fn into_result(self) -> Result<Value, Vec<IntrospectionError>>
into_result will turn an IntrospectionResponse into either Ok(data) or Err(errors)
Trait Implementations§
Source§impl Clone for IntrospectionResponse
impl Clone for IntrospectionResponse
Source§fn clone(&self) -> IntrospectionResponse
fn clone(&self) -> IntrospectionResponse
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 IntrospectionResponse
impl Debug for IntrospectionResponse
Source§impl<'de> Deserialize<'de> for IntrospectionResponse
impl<'de> Deserialize<'de> for IntrospectionResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for IntrospectionResponse
impl PartialEq for IntrospectionResponse
Source§impl Serialize for IntrospectionResponse
impl Serialize for IntrospectionResponse
impl Eq for IntrospectionResponse
impl StructuralPartialEq for IntrospectionResponse
Auto Trait Implementations§
impl Freeze for IntrospectionResponse
impl RefUnwindSafe for IntrospectionResponse
impl Send for IntrospectionResponse
impl Sync for IntrospectionResponse
impl Unpin for IntrospectionResponse
impl UnwindSafe for IntrospectionResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.