pub enum GraphQLBatchResponse<S = DefaultScalarValue>where
S: ScalarValue,{
Single(GraphQLResponse<S>),
Batch(Vec<GraphQLResponse<S>>),
}
Expand description
Simple wrapper around the result (GraphQLResponse) from executing a GraphQLBatchRequest
This struct implements Serialize, so you can simply serialize this
to JSON and send it over the wire. use the is_ok
to determine
wheter to send a 200 or 400 HTTP status code.
Variants§
Single(GraphQLResponse<S>)
Result of a single operation in a GraphQL request.
Batch(Vec<GraphQLResponse<S>>)
Result of a batch operation in a GraphQL request.
Implementations§
Source§impl<S: ScalarValue> GraphQLBatchResponse<S>
impl<S: ScalarValue> GraphQLBatchResponse<S>
Trait Implementations§
Source§impl<S> Serialize for GraphQLBatchResponse<S>where
S: ScalarValue + Serialize,
impl<S> Serialize for GraphQLBatchResponse<S>where
S: ScalarValue + Serialize,
Auto Trait Implementations§
impl<S> Freeze for GraphQLBatchResponse<S>where
S: Freeze,
impl<S> RefUnwindSafe for GraphQLBatchResponse<S>where
S: RefUnwindSafe,
impl<S> Send for GraphQLBatchResponse<S>where
S: Send,
impl<S> Sync for GraphQLBatchResponse<S>where
S: Sync,
impl<S> Unpin for GraphQLBatchResponse<S>where
S: Unpin,
impl<S> UnwindSafe for GraphQLBatchResponse<S>where
S: 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