pub struct GraphqlResponse<T> {
pub data: Option<T>,
pub errors: Vec<GraphqlError>,
pub extensions: Option<Value>,
}Expand description
A response that preserves partial data alongside execution errors.
Fields§
§data: Option<T>Typed data, absent for null or omitted data.
errors: Vec<GraphqlError>Execution or validation errors; an empty list means success.
extensions: Option<Value>Implementation-specific response metadata.
Implementations§
Source§impl<T> GraphqlResponse<T>
impl<T> GraphqlResponse<T>
Sourcepub const fn into_result(self) -> Result<Self, Self>
pub const fn into_result(self) -> Result<Self, Self>
Reject execution errors while retaining the entire partial response on failure.
§Errors
Returns this response unchanged if it contains execution errors.
Trait Implementations§
Source§impl<T: Clone> Clone for GraphqlResponse<T>
impl<T: Clone> Clone for GraphqlResponse<T>
Source§impl<T: Debug> Debug for GraphqlResponse<T>
impl<T: Debug> Debug for GraphqlResponse<T>
Source§impl<'de, T> Deserialize<'de> for GraphqlResponse<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for GraphqlResponse<T>where
T: Deserialize<'de>,
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
impl<T: Eq> Eq for GraphqlResponse<T>
Source§impl<T: PartialEq> PartialEq for GraphqlResponse<T>
impl<T: PartialEq> PartialEq for GraphqlResponse<T>
Source§impl<T> Serialize for GraphqlResponse<T>where
T: Serialize,
impl<T> Serialize for GraphqlResponse<T>where
T: Serialize,
impl<T: PartialEq> StructuralPartialEq for GraphqlResponse<T>
Auto Trait Implementations§
impl<T> Freeze for GraphqlResponse<T>
impl<T> RefUnwindSafe for GraphqlResponse<T>where
Option<T>: RefUnwindSafe,
impl<T> Send for GraphqlResponse<T>
impl<T> Sync for GraphqlResponse<T>
impl<T> Unpin for GraphqlResponse<T>
impl<T> UnsafeUnpin for GraphqlResponse<T>where
Option<T>: UnsafeUnpin,
impl<T> UnwindSafe for GraphqlResponse<T>where
Option<T>: UnwindSafe,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.