pub enum StreamIdempotencyMode {
Manual {
producer_id: String,
idempotent_id: String,
},
Automatic {
producer_id: String,
},
}Expand description
Idempotency mode for stream message production
Supports idempotent message processing to prevent duplicate entries. See Redis Streams Idempotency
Variants§
Manual
Manual mode: Producer provides both producer ID (pid) and idempotent ID (iid)
Example: XADD key IDMP producer-1 iid-1 * field value
Fields
Automatic
Automatic mode: Producer provides only producer ID (pid), Redis generates iid from message content
Example: XADD key IDMPAUTO producer-1 * field value
Trait Implementations§
Source§impl Clone for StreamIdempotencyMode
impl Clone for StreamIdempotencyMode
Source§fn clone(&self) -> StreamIdempotencyMode
fn clone(&self) -> StreamIdempotencyMode
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 StreamIdempotencyMode
impl Debug for StreamIdempotencyMode
Source§impl ToRedisArgs for StreamIdempotencyMode
impl ToRedisArgs for StreamIdempotencyMode
Source§fn write_redis_args<W>(&self, out: &mut W)where
W: ?Sized + RedisWrite,
fn write_redis_args<W>(&self, out: &mut W)where
W: ?Sized + RedisWrite,
This writes the value into a vector of bytes. Each item
is a single argument. Most items generate a single item. Read more
Source§fn to_redis_args(&self) -> Vec<Vec<u8>>
fn to_redis_args(&self) -> Vec<Vec<u8>>
This converts the value into a vector of bytes. Each item
is a single argument. Most items generate a vector of a
single item. Read more
Source§fn describe_numeric_behavior(&self) -> NumericBehavior
fn describe_numeric_behavior(&self) -> NumericBehavior
Returns an information about the contained value with regards
to it’s numeric behavior in a redis context. This is used in
some high level concepts to switch between different implementations
of redis functions (for instance
INCR vs INCRBYFLOAT).Source§fn num_of_args(&self) -> usize
fn num_of_args(&self) -> usize
Returns the number of arguments this value will generate. Read more
Auto Trait Implementations§
impl Freeze for StreamIdempotencyMode
impl RefUnwindSafe for StreamIdempotencyMode
impl Send for StreamIdempotencyMode
impl Sync for StreamIdempotencyMode
impl Unpin for StreamIdempotencyMode
impl UnsafeUnpin for StreamIdempotencyMode
impl UnwindSafe for StreamIdempotencyMode
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