pub enum Command {
Ping(Option<Bytes>),
Echo(Bytes),
Get {
key: String,
},
Set {
key: String,
value: Bytes,
expire: Option<SetExpire>,
},
Del {
keys: Vec<String>,
},
Exists {
keys: Vec<String>,
},
Expire {
key: String,
seconds: u64,
},
Ttl {
key: String,
},
DbSize,
Info {
section: Option<String>,
},
Unknown(String),
}Expand description
A parsed client command, ready for execution.
Variants§
Ping(Option<Bytes>)
PING with an optional message. Returns PONG or echoes the message.
Echo(Bytes)
ECHO
Get
GET
Set
SET
Del
DEL
Exists
EXISTS
Expire
EXPIRE
Ttl
TTL
DbSize
DBSIZE. Returns the number of keys in the database.
Info
INFO [section]. Returns server info. Currently only supports “keyspace”.
Unknown(String)
A command we don’t recognize (yet).
Implementations§
Trait Implementations§
impl Eq for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl !Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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