pub struct Subscriber { /* private fields */ }
Expand description

Represents a subscribing client. Subscription handlers can either reject this subscription request or assign an unique id.

Implementations

Creates new subscriber.

Should only be used for tests.

Consumes Subscriber and assigns unique id to a requestor.

Returns Err if request has already terminated.

Consumes Subscriber and assigns unique id to a requestor.

The returned Future resolves when the subscriber receives subscription id. Resolves to Err if request has already terminated.

Rejects this subscription request with given error.

Returns Err if request has already terminated.

Rejects this subscription request with given error.

The returned Future resolves when the rejection is sent to the client. Resolves to Err if request has already terminated.

Trait Implementations

Formats the value using the given formatter. 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

Returns the argument unchanged.

Calls U::from(self).

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

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.