pub struct OptimizedSetCommand { /* private fields */ }Expand description
Optimized SET command with pre-allocated arguments and options
Implementations§
Source§impl OptimizedSetCommand
 
impl OptimizedSetCommand
Sourcepub fn new(key: impl AsRef<str>, value: impl AsRef<str>) -> Self
 
pub fn new(key: impl AsRef<str>, value: impl AsRef<str>) -> Self
Create a new optimized SET command
Sourcepub fn only_if_not_exists(self) -> Self
 
pub fn only_if_not_exists(self) -> Self
Only set if key doesn’t exist (NX)
Sourcepub fn only_if_exists(self) -> Self
 
pub fn only_if_exists(self) -> Self
Only set if key exists (XX)
Sourcepub fn with_cached_args(self) -> Self
 
pub fn with_cached_args(self) -> Self
Pre-compute and cache arguments
Trait Implementations§
Source§impl Clone for OptimizedSetCommand
 
impl Clone for OptimizedSetCommand
Source§fn clone(&self) -> OptimizedSetCommand
 
fn clone(&self) -> OptimizedSetCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Command for OptimizedSetCommand
 
impl Command for OptimizedSetCommand
Source§fn command_name(&self) -> &str
 
fn command_name(&self) -> &str
Get the command name
Source§fn parse_response(&self, response: RespValue) -> RedisResult<Self::Output>
 
fn parse_response(&self, response: RespValue) -> RedisResult<Self::Output>
Parse the response into the output type
Source§impl Debug for OptimizedSetCommand
 
impl Debug for OptimizedSetCommand
Auto Trait Implementations§
impl Freeze for OptimizedSetCommand
impl RefUnwindSafe for OptimizedSetCommand
impl Send for OptimizedSetCommand
impl Sync for OptimizedSetCommand
impl Unpin for OptimizedSetCommand
impl UnwindSafe for OptimizedSetCommand
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