pub struct RedisTestPublisher { /* private fields */ }Expand description
Publisher returned by
ConnectedRedisTestBroker::publisher.
Mirrors the real publisher’s transaction surface, both kinds: messages published inside a
transaction are buffered and only fan out on commit (in publish order), or are discarded on
abort. The borrowed kind (TransactionalPublisher) uses the handle’s single buffer; the
owned kind (OwnedTransactions) hands out an independent RedisTestTransaction per call.
Trait Implementations§
Source§impl Clone for RedisTestPublisher
impl Clone for RedisTestPublisher
Source§fn clone(&self) -> RedisTestPublisher
fn clone(&self) -> RedisTestPublisher
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RedisTestPublisher
impl Debug for RedisTestPublisher
Source§impl OwnedTransactions for RedisTestPublisher
Owned transactions, mirroring RedisPublisher: every call opens an
independent buffer-owning RedisTestTransaction, so any number can be open concurrently and
the handle keeps publishing directly meanwhile.
impl OwnedTransactions for RedisTestPublisher
Owned transactions, mirroring RedisPublisher: every call opens an
independent buffer-owning RedisTestTransaction, so any number can be open concurrently and
the handle keeps publishing directly meanwhile.
Source§type Transaction = RedisTestTransaction
type Transaction = RedisTestTransaction
The buffer-owning transaction opened by
transaction.Source§async fn transaction(&self) -> Result<RedisTestTransaction, RedisError>
async fn transaction(&self) -> Result<RedisTestTransaction, RedisError>
Opens a new transaction owned by the returned value. Read more
Source§impl Publisher for RedisTestPublisher
impl Publisher for RedisTestPublisher
Source§impl TransactionalPublisher for RedisTestPublisher
impl TransactionalPublisher for RedisTestPublisher
Source§async fn begin_transaction(&self) -> Result<(), Self::Error>
async fn begin_transaction(&self) -> Result<(), Self::Error>
§Errors
Returns RedisError::TransactionBusy when a transaction is already open on this handle,
leaving that one untouched.
Auto Trait Implementations§
impl Freeze for RedisTestPublisher
impl RefUnwindSafe for RedisTestPublisher
impl Send for RedisTestPublisher
impl Sync for RedisTestPublisher
impl Unpin for RedisTestPublisher
impl UnsafeUnpin for RedisTestPublisher
impl UnwindSafe for RedisTestPublisher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<P> ErasedPublisher for Pwhere
P: Publisher,
impl<P> ErasedPublisher for Pwhere
P: Publisher,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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