pub struct RedisPublish;Expand description
The declaration half of the stream publisher: pure policy, constructible anywhere.
XADD needs no options beyond the target key, which travels on each message, so the policy is
a unit marker. It pairs into a RedisPublisher against a ConnectedRedisBroker, which is
what makes “publishing before connect” unrepresentable.
§Examples
use ruststream::{Broker, PublishPolicy};
use ruststream_fred::{RedisBroker, RedisPublish};
let policy = RedisPublish; // no connection in sight
let connected = RedisBroker::standalone("redis://localhost:6379").connect().await?;
let publisher = policy.pair(&connected).await?;Trait Implementations§
Source§impl Clone for RedisPublish
impl Clone for RedisPublish
Source§fn clone(&self) -> RedisPublish
fn clone(&self) -> RedisPublish
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 moreimpl Copy for RedisPublish
Source§impl Debug for RedisPublish
impl Debug for RedisPublish
Source§impl Default for RedisPublish
impl Default for RedisPublish
Source§fn default() -> RedisPublish
fn default() -> RedisPublish
Returns the “default value” for a type. Read more
impl Eq for RedisPublish
Source§impl PartialEq for RedisPublish
impl PartialEq for RedisPublish
Source§impl PublishPolicy<ConnectedRedisBroker> for RedisPublish
impl PublishPolicy<ConnectedRedisBroker> for RedisPublish
Source§type Live = RedisPublisher
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).impl StructuralPartialEq for RedisPublish
Auto Trait Implementations§
impl Freeze for RedisPublish
impl RefUnwindSafe for RedisPublish
impl Send for RedisPublish
impl Sync for RedisPublish
impl Unpin for RedisPublish
impl UnsafeUnpin for RedisPublish
impl UnwindSafe for RedisPublish
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<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