[][src]Module artemis::exchange

Types used by custom exchanges. Regular users probably don't need these.

Structs

Operation

A query operation. One of these is fired for each direct query, as well as for query reruns.

OperationMeta

Metadata for an operation

OperationOptions

Options for the operation. This is just an internal representation of the union between QueryOptions and ClientOptions.

OperationResult

The result of a successful operation.

Enums

OperationType

The type of the operation. This corresponds directly to the GraphQL syntax, query, mutation and subscription.

Traits

Client

Client trait passed to exchanges. Only exposes methods useful to exchanges

Exchange

The main trait that must be implemented by exchanges

ExchangeFactory

An exchange factory. This must be passed to the ClientBuilder by the user, so it should take only necessary parameters.

Extension

An extension that may be passed by the user to provide additional request options to a third-party exchange. This is only here to allow for JS interop - The implementor of the exchange must deserialize JavaScript input to the best of their ability. Note that this may involve complex operations such as converting js_sys::Function to Rust closures or other advanced deserialization. This is not a simple serde-like deserialization.

Type Definitions

ExchangeResult

The result type returned by exchanges