pub struct PubSub<C = Pin<Box<dyn AsyncStream + Send + Sync>>>(_);
Expand description

Represents a PubSub connection.

Implementations

Subscribes to a new channel.

Subscribes to a new channel with a pattern.

Unsubscribes from a channel.

Unsubscribes from a channel with a pattern.

Returns Stream of Msgs from this PubSubs subscriptions.

The message itself is still generic and can be converted into an appropriate type through the helper methods on it.

Returns Stream of Msgs from this PubSubs subscriptions consuming it.

The message itself is still generic and can be converted into an appropriate type through the helper methods on it. This can be useful in cases where the stream needs to be returned or held by something other

Exits from PubSub mode and converts PubSub into Connection.

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.