Skip to main content

ConnectedRedisBroker

Struct ConnectedRedisBroker 

Source
pub struct ConnectedRedisBroker { /* private fields */ }
Expand description

The typed witness that Broker::connect succeeded: it owns the live fred pool.

Every subscription and every publisher is reached from here, so “not connected” is not representable. ConnectedBroker::shutdown consumes it, which makes a publish or subscribe after shutdown a compile error for the owner of the handle.

Implementations§

Source§

impl ConnectedRedisBroker

Source

pub async fn subscribe( &self, def: RedisStream, ) -> Result<RedisSubscriber, RedisError>

Opens a stream subscription described by def.

Ensures the consumer group exists (XGROUP CREATE ... MKSTREAM, ignoring an already-existing group) before returning the subscriber.

§Errors

Returns RedisError::ShutDown when the connection was already torn down, RedisError::InvalidOptions when def names no consumer group, or RedisError::Subscribe when the group cannot be created.

Source

pub async fn subscribe_pubsub( &self, def: RedisPubSub, ) -> Result<RedisPubSubSubscriber, RedisError>

Opens a Pub/Sub subscription on one channel, described by def, on a dedicated client.

§Errors

Returns RedisError::ShutDown when the connection was already torn down, RedisError::Connect when the dedicated client cannot connect, or RedisError::Subscribe when the subscribe command fails.

Source

pub async fn subscribe_pubsub_pattern( &self, def: RedisPubSubPattern, ) -> Result<RedisPubSubSubscriber, RedisError>

Opens a Pub/Sub subscription on a glob (PSUBSCRIBE), described by def, on a dedicated client.

§Errors

Returns RedisError::ShutDown when the connection was already torn down, RedisError::Connect when the dedicated client cannot connect, or RedisError::Subscribe when the subscribe command fails.

Source

pub async fn subscribe_list( &self, def: RedisList, ) -> Result<RedisListSubscriber, RedisError>

Opens a list (work-queue) subscription described by def.

§Errors

Returns RedisError::ShutDown when the connection was already torn down, RedisError::InvalidOptions when def names a recovery ZSET without a min_idle, or RedisError::Connect when the connection the subscription reads on cannot connect.

Source

pub fn publisher(&self) -> RedisPublisher

Returns a stream publisher (XADD) bound to this connection.

Source

pub fn default_publisher(&self) -> RedisDefaultPublisher

Returns the publisher of the broker’s default policy, RedisDefaultPublish, which writes each name the way this connection’s subscriptions read it.

Source

pub fn pubsub_publisher( &self, publish: RedisPubSubPublish, ) -> RedisPubSubPublisher

Returns a Pub/Sub publisher configured by publish (mode and envelope codec).

Source

pub fn list_publisher(&self, publish: RedisListPublish) -> RedisListPublisher

Returns a list publisher (LPUSH) configured by publish (envelope codec and key TTL).

Source

pub fn pool_handle(&self) -> Result<Pool, RedisError>

Returns a clone of the underlying pool, for advanced operations not covered by the wrapper.

§Errors

Returns RedisError::ShutDown once the connection was torn down.

Trait Implementations§

Source§

impl ConnectedBroker for ConnectedRedisBroker

Source§

async fn shutdown(self) -> Result<Self::Closed, Self::Error>

Closes every pooled connection and marks the shared connection dead, so publishers handed out earlier report RedisError::ShutDown instead of running against a closed pool.

§Errors

Returns RedisError::Connect when the QUIT roundtrip fails.

Source§

type Error = RedisError

The error type returned by connected-broker operations.
Source§

type Closed = ClosedRedisBroker

The terminal witness returned by shutdown. Read more
Source§

impl Debug for ConnectedRedisBroker

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl DefaultPublish for ConnectedRedisBroker

Source§

type Policy = RedisDefaultPublish

The broker’s plain publish policy, constructible with its defaults.
Source§

impl PublishPolicy<ConnectedRedisBroker> for RedisPublish

Source§

fn channel_bindings(&self, channel: &str) -> Bindings

An XADD carries its headers as entry fields and the policy has no settings of its own, so what the document learns from here is which Redis structure the channel is and which stream key the entries are appended to.

Source§

type Live = RedisPublisher

The live form this policy pairs into: a Publisher for a leaf policy, or the live wiring form for a combinator stack (a typed publisher over a policy pairs into the same typed publisher over the live leaf).
Source§

fn pair( self, connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<Self::Live, PairError>>

Pairs the policy with a connected broker, producing the live publisher. Read more
Source§

fn operation_bindings(&self, channel: &str) -> Bindings

What a publish through this policy adds to its send operation in the document. Read more
Source§

fn message_bindings(&self, channel: &str) -> Bindings

What a publish through this policy adds to the messages that leave through it. Read more
Source§

fn reply_address_location(&self) -> Option<&'static str>

Where a client finds the address of a reply this policy publishes, as a runtime expression. Read more
Source§

impl PublishPolicy<ConnectedRedisBroker> for RedisTransactionalPublish

Source§

fn pair( self, connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<Self::Live, PairError>>

§Errors

Returns a PairError carrying RedisError::InvalidOptions on a cluster topology.

Source§

type Live = RedisPublisher

The live form this policy pairs into: a Publisher for a leaf policy, or the live wiring form for a combinator stack (a typed publisher over a policy pairs into the same typed publisher over the live leaf).
Source§

fn channel_bindings(&self, channel: &str) -> Bindings

What a publish through this policy adds to its channel in the generated AsyncAPI document. Read more
Source§

fn operation_bindings(&self, channel: &str) -> Bindings

What a publish through this policy adds to its send operation in the document. Read more
Source§

fn message_bindings(&self, channel: &str) -> Bindings

What a publish through this policy adds to the messages that leave through it. Read more
Source§

fn reply_address_location(&self) -> Option<&'static str>

Where a client finds the address of a reply this policy publishes, as a runtime expression. Read more
Source§

impl PublishPolicy<ConnectedRedisBroker> for RedisDefaultPublish

Source§

fn channel_bindings(&self, channel: &str) -> Bindings

Described as the stream publish, the family of a name no subscription of the service reads; the document is built before any subscription opens, so a name that turns out to be read as a list or a channel is described as a stream.

Source§

type Live = RedisDefaultPublisher

The live form this policy pairs into: a Publisher for a leaf policy, or the live wiring form for a combinator stack (a typed publisher over a policy pairs into the same typed publisher over the live leaf).
Source§

fn pair( self, connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<Self::Live, PairError>>

Pairs the policy with a connected broker, producing the live publisher. Read more
Source§

fn operation_bindings(&self, channel: &str) -> Bindings

What a publish through this policy adds to its send operation in the document. Read more
Source§

fn message_bindings(&self, channel: &str) -> Bindings

What a publish through this policy adds to the messages that leave through it. Read more
Source§

fn reply_address_location(&self) -> Option<&'static str>

Where a client finds the address of a reply this policy publishes, as a runtime expression. Read more
Source§

impl PublishPolicy<ConnectedRedisBroker> for RedisListPublish

Source§

fn channel_bindings(&self, channel: &str) -> Bindings

The list key the policy pushes onto, the expiry it re-arms there on every push, and how headers are framed beside the payload.

Source§

type Live = RedisListPublisher

The live form this policy pairs into: a Publisher for a leaf policy, or the live wiring form for a combinator stack (a typed publisher over a policy pairs into the same typed publisher over the live leaf).
Source§

fn pair( self, connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<Self::Live, PairError>>

Pairs the policy with a connected broker, producing the live publisher. Read more
Source§

fn operation_bindings(&self, channel: &str) -> Bindings

What a publish through this policy adds to its send operation in the document. Read more
Source§

fn message_bindings(&self, channel: &str) -> Bindings

What a publish through this policy adds to the messages that leave through it. Read more
Source§

fn reply_address_location(&self) -> Option<&'static str>

Where a client finds the address of a reply this policy publishes, as a runtime expression. Read more
Source§

impl PublishPolicy<ConnectedRedisBroker> for RedisPubSubPublish

Source§

fn channel_bindings(&self, channel: &str) -> Bindings

The channel a PUBLISH goes out on, the delivery mode it goes out in, and how headers are framed beside the payload.

Source§

type Live = RedisPubSubPublisher

The live form this policy pairs into: a Publisher for a leaf policy, or the live wiring form for a combinator stack (a typed publisher over a policy pairs into the same typed publisher over the live leaf).
Source§

fn pair( self, connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<Self::Live, PairError>>

Pairs the policy with a connected broker, producing the live publisher. Read more
Source§

fn operation_bindings(&self, channel: &str) -> Bindings

What a publish through this policy adds to its send operation in the document. Read more
Source§

fn message_bindings(&self, channel: &str) -> Bindings

What a publish through this policy adds to the messages that leave through it. Read more
Source§

fn reply_address_location(&self) -> Option<&'static str>

Where a client finds the address of a reply this policy publishes, as a runtime expression. Read more
Source§

impl RedeliveryAddressed<ConnectedRedisBroker> for RedisList

The list key: the subscription pops from it and RedisListPublish pushes onto it, so a deferred copy lands in the same queue the delivery came from.

Source§

fn redelivery_address( &self, _connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>

Where a publish reaches this subscription again. Read more
Source§

impl<Mode: WindowMode> RedeliveryAddressed<ConnectedRedisBroker> for Pipelined<RedisStream, Mode>

Source§

fn redelivery_address( &self, connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>

Where a publish reaches this subscription again. Read more
Source§

impl<Mode: WindowMode> RedeliveryAddressed<ConnectedRedisBroker> for Pipelined<RedisList, Mode>

Source§

fn redelivery_address( &self, connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>

Where a publish reaches this subscription again. Read more
Source§

impl<Mode: WindowMode> RedeliveryAddressed<ConnectedRedisBroker> for Pipelined<RedisPubSub, Mode>

Source§

fn redelivery_address( &self, connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>

Where a publish reaches this subscription again. Read more
Source§

impl RedeliveryAddressed<ConnectedRedisBroker> for RedisPubSub

The channel itself.

The answer is about the address, not about the command: reaching a PubSubMode::Sharded subscription still takes a publisher in the same mode, which is the policy the mount site names with out_retry.

Source§

fn redelivery_address( &self, _connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>

Where a publish reaches this subscription again. Read more
Source§

impl RedeliveryAddressed<ConnectedRedisBroker> for RedisStream

The stream key, in every read mode: an XADD there is read by the consumer group this subscription belongs to.

Under reclaim the copy is read by the group’s tail reader rather than by this subscription, which only ever takes entries already pending on another consumer. That is the topology the mode is written for - a reclaim subscriber runs beside a new one on the same group - so the copy reaches the handler either way.

Source§

fn redelivery_address( &self, _connected: &ConnectedRedisBroker, ) -> impl Future<Output = Result<RedeliveryAddress, RedisError>>

Where a publish reaches this subscription again. Read more
Source§

impl Subscribe for ConnectedRedisBroker

Source§

type Copies = AddressedCopies

A bare name opens a consumer group over that stream key, and an XADD there is read by the group again, so the name is both ends and a retry copy needs nothing from the mount site.

Source§

type Subscriber = RedisSubscriber

The subscriber type opened by a by-name subscription.
Source§

async fn subscribe(&self, name: &str) -> Result<Self::Subscriber, Self::Error>

Opens a subscription to name, producing this broker’s Subscriber. Read more
Source§

fn declare_retry( &self, name: &str, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>

Takes what a registration mounted by a bare name declared about its retries, before the subscription opens. Read more
Source§

impl SubscriptionSource<ConnectedRedisBroker> for RedisList

Source§

type Copies = AddressedCopies

A retry copy is an LPUSH this process makes, and the list key is where it goes.

Source§

type Subscriber = RedisListSubscriber

The subscriber type this source opens.
Source§

fn name(&self) -> &str

The name (subject / channel) this subscription binds to. Read more
Source§

fn declare_retry(self, declaration: &RetryDeclaration) -> Self

Takes the registration’s retry declaration into the descriptor, before the subscription opens. Read more
Source§

async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>

Opens the subscription against the connected broker. Called once at startup. Read more
Source§

fn channel_bindings(&self) -> Bindings

What this subscription adds to its channel in the generated AsyncAPI document. Read more
Source§

fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>

Carries the registration’s declaration to the broker, at the same point and before the subscription opens. Read more
Source§

fn operation_bindings(&self) -> Bindings

What this subscription adds to its receive operation in the document. Read more
Source§

fn message_bindings(&self) -> Bindings

What this subscription adds to the messages that arrive on it. Read more
Source§

impl<Mode: WindowMode> SubscriptionSource<ConnectedRedisBroker> for Pipelined<RedisStream, Mode>

Source§

type Subscriber = PipelinedSubscriber<RedisSubscriber, StreamForm>

The subscriber type this source opens.
Source§

type Copies = AddressedCopies

Who publishes the copies this subscription’s retries are made of, and who names where they go: AddressedCopies, NamedCopies or BrokerMoves. Read more
Source§

fn name(&self) -> &str

The name (subject / channel) this subscription binds to. Read more
Source§

fn declare_retry(self, declaration: &RetryDeclaration) -> Self

Takes the registration’s retry declaration into the descriptor, before the subscription opens. Read more
Source§

fn channel_bindings(&self) -> Bindings

What this subscription adds to its channel in the generated AsyncAPI document. Read more
Source§

async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>

Opens the subscription against the connected broker. Called once at startup. Read more
Source§

fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>

Carries the registration’s declaration to the broker, at the same point and before the subscription opens. Read more
Source§

fn operation_bindings(&self) -> Bindings

What this subscription adds to its receive operation in the document. Read more
Source§

fn message_bindings(&self) -> Bindings

What this subscription adds to the messages that arrive on it. Read more
Source§

impl<Mode: WindowMode> SubscriptionSource<ConnectedRedisBroker> for Pipelined<RedisPubSub, Mode>

Source§

type Subscriber = PipelinedSubscriber<ChannelReader, PubSubForm>

The subscriber type this source opens.
Source§

type Copies = AddressedCopies

Who publishes the copies this subscription’s retries are made of, and who names where they go: AddressedCopies, NamedCopies or BrokerMoves. Read more
Source§

fn name(&self) -> &str

The name (subject / channel) this subscription binds to. Read more
Source§

fn declare_retry(self, declaration: &RetryDeclaration) -> Self

Takes the registration’s retry declaration into the descriptor, before the subscription opens. Read more
Source§

fn channel_bindings(&self) -> Bindings

What this subscription adds to its channel in the generated AsyncAPI document. Read more
Source§

async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>

Opens the subscription against the connected broker. Called once at startup. Read more
Source§

fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>

Carries the registration’s declaration to the broker, at the same point and before the subscription opens. Read more
Source§

fn operation_bindings(&self) -> Bindings

What this subscription adds to its receive operation in the document. Read more
Source§

fn message_bindings(&self) -> Bindings

What this subscription adds to the messages that arrive on it. Read more
Source§

impl<Mode: WindowMode> SubscriptionSource<ConnectedRedisBroker> for Pipelined<RedisPubSubPattern, Mode>

A pattern reads every channel its glob matches and names none a publish could reach, so the mount site names where a retry copy goes, as on the pattern subscription without a window.

Source§

type Subscriber = PipelinedSubscriber<ChannelReader, PubSubForm>

The subscriber type this source opens.
Source§

type Copies = NamedCopies

Who publishes the copies this subscription’s retries are made of, and who names where they go: AddressedCopies, NamedCopies or BrokerMoves. Read more
Source§

fn name(&self) -> &str

The name (subject / channel) this subscription binds to. Read more
Source§

async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>

Opens the subscription against the connected broker. Called once at startup. Read more
Source§

fn channel_bindings(&self) -> Bindings

What this subscription adds to its channel in the generated AsyncAPI document. Read more
Source§

fn declare_retry(self, declaration: &RetryDeclaration) -> Self
where Self: Sized,

Takes the registration’s retry declaration into the descriptor, before the subscription opens. Read more
Source§

fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>

Carries the registration’s declaration to the broker, at the same point and before the subscription opens. Read more
Source§

fn operation_bindings(&self) -> Bindings

What this subscription adds to its receive operation in the document. Read more
Source§

fn message_bindings(&self) -> Bindings

What this subscription adds to the messages that arrive on it. Read more
Source§

impl<Mode: WindowMode> SubscriptionSource<ConnectedRedisBroker> for Pipelined<RedisList, Mode>

Source§

type Subscriber = PipelinedSubscriber<ListReader, ListForm>

The subscriber type this source opens.
Source§

type Copies = AddressedCopies

Who publishes the copies this subscription’s retries are made of, and who names where they go: AddressedCopies, NamedCopies or BrokerMoves. Read more
Source§

fn name(&self) -> &str

The name (subject / channel) this subscription binds to. Read more
Source§

fn declare_retry(self, declaration: &RetryDeclaration) -> Self

Takes the registration’s retry declaration into the descriptor, before the subscription opens. Read more
Source§

fn channel_bindings(&self) -> Bindings

What this subscription adds to its channel in the generated AsyncAPI document. Read more
Source§

async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>

Opens the subscription against the connected broker. Called once at startup. Read more
Source§

fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>

Carries the registration’s declaration to the broker, at the same point and before the subscription opens. Read more
Source§

fn operation_bindings(&self) -> Bindings

What this subscription adds to its receive operation in the document. Read more
Source§

fn message_bindings(&self) -> Bindings

What this subscription adds to the messages that arrive on it. Read more
Source§

impl SubscriptionSource<ConnectedRedisBroker> for RedisPubSub

Source§

type Copies = AddressedCopies

Pub/Sub cannot acknowledge, so every retry is a copy this process publishes, and the channel is where it goes.

Source§

type Subscriber = RedisPubSubSubscriber

The subscriber type this source opens.
Source§

fn name(&self) -> &str

The name (subject / channel) this subscription binds to. Read more
Source§

fn declare_retry(self, declaration: &RetryDeclaration) -> Self

Takes the registration’s retry declaration into the descriptor, before the subscription opens. Read more
Source§

async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>

Opens the subscription against the connected broker. Called once at startup. Read more
Source§

fn channel_bindings(&self) -> Bindings

What this subscription adds to its channel in the generated AsyncAPI document. Read more
Source§

fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>

Carries the registration’s declaration to the broker, at the same point and before the subscription opens. Read more
Source§

fn operation_bindings(&self) -> Bindings

What this subscription adds to its receive operation in the document. Read more
Source§

fn message_bindings(&self) -> Bindings

What this subscription adds to the messages that arrive on it. Read more
Source§

impl SubscriptionSource<ConnectedRedisBroker> for RedisPubSubPattern

A pattern subscription reads every channel the glob matches, and a glob is not a channel a PUBLISH can name, so the mount site names where a retry copy goes: .out_retry(policy).to(..) for a fixed channel, or a transform that reads the delivery’s own channel.

Source§

type Subscriber = RedisPubSubSubscriber

The subscriber type this source opens.
Source§

type Copies = NamedCopies

Who publishes the copies this subscription’s retries are made of, and who names where they go: AddressedCopies, NamedCopies or BrokerMoves. Read more
Source§

fn name(&self) -> &str

The name (subject / channel) this subscription binds to. Read more
Source§

async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>

Opens the subscription against the connected broker. Called once at startup. Read more
Source§

fn channel_bindings(&self) -> Bindings

What this subscription adds to its channel in the generated AsyncAPI document. Read more
Source§

fn declare_retry(self, declaration: &RetryDeclaration) -> Self
where Self: Sized,

Takes the registration’s retry declaration into the descriptor, before the subscription opens. Read more
Source§

fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>

Carries the registration’s declaration to the broker, at the same point and before the subscription opens. Read more
Source§

fn operation_bindings(&self) -> Bindings

What this subscription adds to its receive operation in the document. Read more
Source§

fn message_bindings(&self) -> Bindings

What this subscription adds to the messages that arrive on it. Read more
Source§

impl SubscriptionSource<ConnectedRedisBroker> for RedisStream

Source§

type Copies = AddressedCopies

A retry copy is an XADD this process makes, and the stream key is where it goes.

Source§

type Subscriber = RedisSubscriber

The subscriber type this source opens.
Source§

fn name(&self) -> &str

The name (subject / channel) this subscription binds to. Read more
Source§

fn declare_retry(self, declaration: &RetryDeclaration) -> Self

Takes the registration’s retry declaration into the descriptor, before the subscription opens. Read more
Source§

async fn subscribe( self, connected: &ConnectedRedisBroker, ) -> Result<Self::Subscriber, RedisError>

Opens the subscription against the connected broker. Called once at startup. Read more
Source§

fn channel_bindings(&self) -> Bindings

What this subscription adds to its channel in the generated AsyncAPI document. Read more
Source§

fn declare_retry_on( &self, connected: &C, declaration: &RetryDeclaration, ) -> Result<(), DeclareRetryError>

Carries the registration’s declaration to the broker, at the same point and before the subscription opens. Read more
Source§

fn operation_bindings(&self) -> Bindings

What this subscription adds to its receive operation in the document. Read more
Source§

fn message_bindings(&self) -> Bindings

What this subscription adds to the messages that arrive on it. Read more
Source§

impl TestableBroker for ConnectedRedisBroker

Available on crate feature testing only.

The harness’s view of the connection: the in-process server it injects into and reads the writes of, and, in both modes, where a publish is delivered.

§Panics

inject and published panic on a broker connected with connect: the harness drives only the connection connect_in_process produced, and a live connection has no log to read and no synchronous way to take a message.

Source§

fn inject(&self, message: OutgoingMessage<'_>)

Writes the message the way the default publisher writes its name: an XADD, or the LPUSH or PUBLISH of the subscription that reads it, in that subscription’s framing. A name only pattern subscriptions read goes out with a raw PUBLISH, as the producers they listen to publish it: an XADD would reach none of them.

Source§

fn published(&self, name: &str) -> Vec<RawMessage>

Every write to name, decoded the way the subscription reading it decodes: an entry’s fields, or a list element or a channel message in its subscription’s framing. A requeue’s copy and a delayed entry the sweep adds back are writes too.

Source§

fn routes(&self, destination: &str, subscriptions: &[&str]) -> Vec<usize>

Redis’s routing: a stream entry is delivered once to every consumer group reading the stream (to one consumer of each), a list element to one consumer, and a channel message to every subscription of the channel and every pattern subscription whose glob matches it. A name no subscription reads exactly is reached by the pattern subscriptions alone.

Subscriptions sharing a name are told apart by nothing but the name, so a publish is owed by the first position of each name as many times as that name receives it. In process that is where it goes: a group’s new entries go to its earliest open subscription.

Source§

fn install_coordinator(&self, coordinator: Coordinator)

Installs the harness coordinator into this broker’s bus for a test run. Idempotent: a second install on the same broker is ignored.
Source§

fn evicted(&self, name: &str) -> usize

How many of the oldest messages published to name this broker no longer holds, so published starts after them. Read more
Source§

fn backlog(&self) -> Backlog

What a subscription opened by name receives of the messages published to that name before it opened, as the real broker answers it: Backlog::Missed for publish/subscribe, Backlog::Delivered for a queue or a log that keeps them. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PublishedThrough<DefaultSlot> for T

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more