pub struct GraphqlResponse {
pub data: Option<Value>,
pub errors: Option<Vec<GraphqlError>>,
}Expand description
A complete GraphQL HTTP response body.
Either data or errors is populated — never both in normal operation.
Fields§
§data: Option<Value>Query result data, keyed by selection field name.
errors: Option<Vec<GraphqlError>>Error list if the request could not be fulfilled.
Implementations§
Source§impl GraphqlResponse
impl GraphqlResponse
Sourcepub fn errors(errors: Vec<GraphqlError>) -> Self
pub fn errors(errors: Vec<GraphqlError>) -> Self
Construct an error response from multiple errors.
Trait Implementations§
Source§impl Clone for GraphqlResponse
impl Clone for GraphqlResponse
Source§fn clone(&self) -> GraphqlResponse
fn clone(&self) -> GraphqlResponse
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 GraphqlResponse
impl Debug for GraphqlResponse
Source§impl<'de> Deserialize<'de> for GraphqlResponse
impl<'de> Deserialize<'de> for GraphqlResponse
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
Auto Trait Implementations§
impl Freeze for GraphqlResponse
impl RefUnwindSafe for GraphqlResponse
impl Send for GraphqlResponse
impl Sync for GraphqlResponse
impl Unpin for GraphqlResponse
impl UnsafeUnpin for GraphqlResponse
impl UnwindSafe for GraphqlResponse
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