Enum nash_protocol::protocol::ResponseOrError[][src]

pub enum ResponseOrError<T> {
    Response(DataResponse<T>),
    Error(ErrorResponse),
}
Expand description

Wrapper type to account for GraphQL errors

Variants

Response(DataResponse<T>)

Tuple Fields of Response

0: DataResponse<T>

Tuple Fields of Error

0: ErrorResponse

Implementations

Build from data

Get response from wrapper if it exists

Get response from wrapper if it exists, will destroy wrapper

Get response or else error

Get error from wrapper if it exists

Is the response a GraphQL error?

Transform the inner value of a valid response. Will not transform an error

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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