pub enum Response {
    Init(InitResponse),
    PushConfirm(PushConfirm),
    PullResponse(PullResponse),
    Index(IndexResponse),
}
Expand description

A convenience enum to wrap all possible response types

In your worker you will want to match this enum, given to you via the ProtocolParser abstraction.

Variants

Init(InitResponse)

Wraps an InitResponse, see its documentation for more info.

PushConfirm(PushConfirm)

Wraps an PushConfirm response, see its documentation for more info.

PullResponse(PullResponse)

Wraps an PullResponse, see its documentation for more info.

Index(IndexResponse)

Wraps a IndexResponse, see its documentation for more info.

Trait Implementations

Deserialize this value from the given Serde deserializer. Read more

A function which checks whether this parser should be called for a particular protocol payload. Read more

Parse a ProtocolPayload, which must have a type supported by this parser. 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

Decode a slice.

Encode the type into an Encoded type.

Returns the argument unchanged.

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

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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