Struct rustis::commands::CommandInfo

source ·
pub struct CommandInfo {
    pub name: String,
    pub arity: isize,
    pub flags: Vec<String>,
    pub first_key: usize,
    pub last_key: isize,
    pub step: usize,
    pub acl_categories: Vec<String>,
    pub command_tips: Vec<CommandTip>,
    pub key_specifications: Vec<KeySpecification>,
    pub sub_commands: Vec<CommandInfo>,
}
Expand description

Command info result for the command command.

Fields§

§name: String

This is the command’s name in lowercase.

§arity: isize

Arity is the number of arguments a command expects. It follows a simple pattern:

  • A positive integer means a fixed number of arguments.
  • A negative integer means a minimal number of arguments.
§flags: Vec<String>

Command flags are an array. See COMMAND documentation for the list of flags

§first_key: usize

The position of the command’s first key name argument. For most commands, the first key’s position is 1. Position 0 is always the command name itself.

§last_key: isize

The position of the command’s last key name argument.

§step: usize

The step, or increment, between the first key and the position of the next key.

§acl_categories: Vec<String>

[From Redis 6.0] This is an array of simple strings that are the ACL categories to which the command belongs.

§command_tips: Vec<CommandTip>

[From Redis 7.0] Helpful information about the command. To be used by clients/proxies. See https://redis.io/docs/reference/command-tips/

§key_specifications: Vec<KeySpecification>

[From Redis 7.0] This is an array consisting of the command’s key specifications. See https://redis.io/docs/reference/key-specs/

§sub_commands: Vec<CommandInfo>

Trait Implementations§

source§

impl Clone for CommandInfo

source§

fn clone(&self) -> CommandInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CommandInfo

source§

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

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

impl<'de> Deserialize<'de> for CommandInfo

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. 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, 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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> Response for T