Struct async_graphql::Response [−][src]
pub struct Response {
pub data: Value,
pub extensions: BTreeMap<String, Value>,
pub cache_control: CacheControl,
pub errors: Vec<ServerError>,
pub http_headers: HeaderMap<String>,
}
Expand description
Query response
Fields
data: Value
Data of query result
extensions: BTreeMap<String, Value>
Extensions result
cache_control: CacheControl
Cache control value
errors: Vec<ServerError>
Errors
http_headers: HeaderMap<String>
HTTP headers
Implementations
Create a response from some errors.
Set the extension result of the response.
Set the http headers of the response.
Set the cache control of the response.
Extract the error from the response. Only if the error
field is empty will this return
Ok
.
Trait Implementations
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 RefUnwindSafe for Response
impl UnwindSafe for Response
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more