Skip to main content

ShardRequest

Enum ShardRequest 

Source
pub enum ShardRequest {
Show 56 variants Get { key: String, }, Set { key: String, value: Bytes, expire: Option<Duration>, nx: bool, xx: bool, }, Incr { key: String, }, Decr { key: String, }, IncrBy { key: String, delta: i64, }, DecrBy { key: String, delta: i64, }, IncrByFloat { key: String, delta: f64, }, Append { key: String, value: Bytes, }, Strlen { key: String, }, Keys { pattern: String, }, Rename { key: String, newkey: String, }, Del { key: String, }, Unlink { key: String, }, Exists { key: String, }, Expire { key: String, seconds: u64, }, Ttl { key: String, }, Persist { key: String, }, Pttl { key: String, }, Pexpire { key: String, milliseconds: u64, }, LPush { key: String, values: Vec<Bytes>, }, RPush { key: String, values: Vec<Bytes>, }, LPop { key: String, }, RPop { key: String, }, LRange { key: String, start: i64, stop: i64, }, LLen { key: String, }, Type { key: String, }, ZAdd { key: String, members: Vec<(f64, String)>, nx: bool, xx: bool, gt: bool, lt: bool, ch: bool, }, ZRem { key: String, members: Vec<String>, }, ZScore { key: String, member: String, }, ZRank { key: String, member: String, }, ZCard { key: String, }, ZRange { key: String, start: i64, stop: i64, with_scores: bool, }, HSet { key: String, fields: Vec<(String, Bytes)>, }, HGet { key: String, field: String, }, HGetAll { key: String, }, HDel { key: String, fields: Vec<String>, }, HExists { key: String, field: String, }, HLen { key: String, }, HIncrBy { key: String, field: String, delta: i64, }, HKeys { key: String, }, HVals { key: String, }, HMGet { key: String, fields: Vec<String>, }, SAdd { key: String, members: Vec<String>, }, SRem { key: String, members: Vec<String>, }, SMembers { key: String, }, SIsMember { key: String, member: String, }, SCard { key: String, }, DbSize, Stats, Snapshot, RewriteAof, FlushDb, FlushDbAsync, Scan { cursor: u64, count: usize, pattern: Option<String>, }, CountKeysInSlot { slot: u16, }, GetKeysInSlot { slot: u16, count: usize, },
}
Expand description

A protocol-agnostic command sent to a shard.

Variants§

§

Get

Fields

§

Set

Fields

§value: Bytes
§nx: bool

Only set the key if it does not already exist.

§xx: bool

Only set the key if it already exists.

§

Incr

Fields

§

Decr

Fields

§

IncrBy

Fields

§delta: i64
§

DecrBy

Fields

§delta: i64
§

IncrByFloat

Fields

§delta: f64
§

Append

Fields

§value: Bytes
§

Strlen

Fields

§

Keys

Returns all keys matching a glob pattern in this shard.

Fields

§pattern: String
§

Rename

Renames a key within this shard.

Fields

§newkey: String
§

Del

Fields

Like DEL but defers value deallocation to the background drop thread.

Fields

§

Exists

Fields

§

Expire

Fields

§seconds: u64
§

Ttl

Fields

§

Persist

Fields

§

Pttl

Fields

§

Pexpire

Fields

§milliseconds: u64
§

LPush

Fields

§values: Vec<Bytes>
§

RPush

Fields

§values: Vec<Bytes>
§

LPop

Fields

§

RPop

Fields

§

LRange

Fields

§start: i64
§stop: i64
§

LLen

Fields

§

Type

Fields

§

ZAdd

Fields

§members: Vec<(f64, String)>
§nx: bool
§xx: bool
§gt: bool
§lt: bool
§ch: bool
§

ZRem

Fields

§members: Vec<String>
§

ZScore

Fields

§member: String
§

ZRank

Fields

§member: String
§

ZCard

Fields

§

ZRange

Fields

§start: i64
§stop: i64
§with_scores: bool
§

HSet

Fields

§fields: Vec<(String, Bytes)>
§

HGet

Fields

§field: String
§

HGetAll

Fields

§

HDel

Fields

§fields: Vec<String>
§

HExists

Fields

§field: String
§

HLen

Fields

§

HIncrBy

Fields

§field: String
§delta: i64
§

HKeys

Fields

§

HVals

Fields

§

HMGet

Fields

§fields: Vec<String>
§

SAdd

Fields

§members: Vec<String>
§

SRem

Fields

§members: Vec<String>
§

SMembers

Fields

§

SIsMember

Fields

§member: String
§

SCard

Fields

§

DbSize

Returns the key count for this shard.

§

Stats

Returns keyspace stats for this shard.

§

Snapshot

Triggers a snapshot write.

§

RewriteAof

Triggers an AOF rewrite (snapshot + truncate AOF).

§

FlushDb

Clears all keys from the keyspace.

§

FlushDbAsync

Clears all keys, deferring deallocation to the background drop thread.

§

Scan

Scans keys in the keyspace.

Fields

§cursor: u64
§count: usize
§pattern: Option<String>
§

CountKeysInSlot

Counts keys in this shard that hash to the given cluster slot.

Fields

§slot: u16
§

GetKeysInSlot

Returns up to count keys that hash to the given cluster slot.

Fields

§slot: u16
§count: usize

Trait Implementations§

Source§

impl Debug for ShardRequest

Source§

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

Formats the value using the given formatter. 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<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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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
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
Source§

impl<T> OptionalSend for T
where T: Send + ?Sized,

Source§

impl<T> OptionalSync for T
where T: Sync + ?Sized,