pub trait GraphqlOperation: Serialize {
type GenericResponse;
type Response;
type Error: Error;
// Required method
fn decode(
&self,
data: Self::GenericResponse,
) -> Result<Self::Response, Self::Error>;
}
Expand description
An abstraction over GraphQL operations.
Required Associated Types§
Sourcetype GenericResponse
type GenericResponse
The “generic” response type. A graphql-ws-client supports running multiple
operations at a time. This GenericResponse is what will intially be decoded -
with the decode
function converting this into the actual operation response.
This type needs to match up with GraphqlClient::Response.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.