pub struct Pub<'a, PSB: PubSubBehavior<T> + ?Sized, T: Clone> { /* private fields */ }
Expand description

A publisher to a channel

Implementations

Publish a message right now even when the queue is full. This may cause a subscriber to miss an older message.

Publish a message. But if the message queue is full, wait for all subscribers to have read the last message

Publish a message if there is space in the message queue

The amount of messages that can still be published without having to wait or without having to lag the subscribers

Note: In the time between checking this and a publish action, other publishers may have had time to publish something. So checking doesn’t give any guarantees.

Trait Implementations

Executes the destructor for this type. 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.