pub enum StreamWorkerCmd {
    Fetch,
    Pull {
        num: usize,
    },
}
Expand description

A protocol exchanged between a stream consumer and stream producer

Variants

Fetch

Trigger a fetch event

These events are fired from worker to itself to create a delayed reactive response

Pull

Fields

num: usize

Number of messages to pull.

Zero is used as a sentinal to indicate “all messages”.

Pull messages from the consumer’s buffer

Implementations

Return a ProtocolPayload containing a Fetch event.

Pull messages from the consumer’s buffer

When sending Pull { num: 0 } all available messages are pulled. It is recommended to configure your stream consumer into “forwarding mode”.

Trait Implementations

Formats the value using the given formatter. Read more

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