Trait redis_driver::ConnectionCommands
source · pub trait ConnectionCommands {
Show 22 methods
fn auth<U, P>(
&mut self,
username: Option<U>,
password: P
) -> PreparedCommand<'_, Self, ()>
where
Self: Sized,
U: Into<BulkString>,
P: Into<BulkString>,
{ ... }
fn client_caching(
&mut self,
mode: ClientCachingMode
) -> PreparedCommand<'_, Self, Option<()>>
where
Self: Sized,
{ ... }
fn client_getname<CN>(&mut self) -> PreparedCommand<'_, Self, Option<CN>>
where
Self: Sized,
CN: FromValue,
{ ... }
fn client_getredir(&mut self) -> PreparedCommand<'_, Self, i64>
where
Self: Sized,
{ ... }
fn client_id(&mut self) -> PreparedCommand<'_, Self, i64>
where
Self: Sized,
{ ... }
fn client_info(&mut self) -> PreparedCommand<'_, Self, ClientInfo>
where
Self: Sized,
{ ... }
fn client_kill(
&mut self,
options: ClientKillOptions
) -> PreparedCommand<'_, Self, usize>
where
Self: Sized,
{ ... }
fn client_list(
&mut self,
options: ClientListOptions
) -> PreparedCommand<'_, Self, ClientListResult>
where
Self: Sized,
{ ... }
fn client_no_evict(
&mut self,
no_evict: bool
) -> PreparedCommand<'_, Self, ()>
where
Self: Sized,
{ ... }
fn client_pause(
&mut self,
timeout: u64,
mode: ClientPauseMode
) -> PreparedCommand<'_, Self, ()>
where
Self: Sized,
{ ... }
fn client_reply(
&mut self,
mode: ClientReplyMode
) -> PreparedCommand<'_, Self, ()>
where
Self: Sized,
{ ... }
fn client_setname<CN>(
&mut self,
connection_name: CN
) -> PreparedCommand<'_, Self, ()>
where
Self: Sized,
CN: Into<BulkString>,
{ ... }
fn client_tracking(
&mut self,
status: ClientTrackingStatus,
options: ClientTrackingOptions
) -> PreparedCommand<'_, Self, ()>
where
Self: Sized,
{ ... }
fn client_trackinginfo(
&mut self
) -> PreparedCommand<'_, Self, ClientTrackingInfo>
where
Self: Sized,
{ ... }
fn client_unblock(
&mut self,
client_id: i64,
mode: ClientUnblockMode
) -> PreparedCommand<'_, Self, bool>
where
Self: Sized,
{ ... }
fn client_unpause(&mut self) -> PreparedCommand<'_, Self, bool>
where
Self: Sized,
{ ... }
fn echo<M, R>(&mut self, message: M) -> PreparedCommand<'_, Self, R>
where
Self: Sized,
M: Into<BulkString>,
R: FromValue,
{ ... }
fn hello(
&mut self,
options: HelloOptions
) -> PreparedCommand<'_, Self, HelloResult>
where
Self: Sized,
{ ... }
fn ping<R>(&mut self, options: PingOptions) -> PreparedCommand<'_, Self, R>
where
Self: Sized,
R: FromValue,
{ ... }
fn quit(&mut self) -> PreparedCommand<'_, Self, ()>
where
Self: Sized,
{ ... }
fn reset(&mut self) -> PreparedCommand<'_, Self, ()>
where
Self: Sized,
{ ... }
fn select(&mut self, index: usize) -> PreparedCommand<'_, Self, ()>
where
Self: Sized,
{ ... }
}
Expand description
A group of Redis commands related to connection management
See Also
Provided Methods
sourcefn auth<U, P>(
&mut self,
username: Option<U>,
password: P
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
U: Into<BulkString>,
P: Into<BulkString>,
fn auth<U, P>(
&mut self,
username: Option<U>,
password: P
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
U: Into<BulkString>,
P: Into<BulkString>,
sourcefn client_caching(
&mut self,
mode: ClientCachingMode
) -> PreparedCommand<'_, Self, Option<()>>where
Self: Sized,
fn client_caching(
&mut self,
mode: ClientCachingMode
) -> PreparedCommand<'_, Self, Option<()>>where
Self: Sized,
This command controls the tracking of the keys in the next command executed by the connection, when tracking is enabled in OPTIN or OPTOUT mode.
See Also
sourcefn client_getname<CN>(&mut self) -> PreparedCommand<'_, Self, Option<CN>>where
Self: Sized,
CN: FromValue,
fn client_getname<CN>(&mut self) -> PreparedCommand<'_, Self, Option<CN>>where
Self: Sized,
CN: FromValue,
sourcefn client_getredir(&mut self) -> PreparedCommand<'_, Self, i64>where
Self: Sized,
fn client_getredir(&mut self) -> PreparedCommand<'_, Self, i64>where
Self: Sized,
This command returns the client ID we are redirecting our tracking notifications to.
Return
the ID of the client we are redirecting the notifications to. The command returns -1 if client tracking is not enabled, or 0 if client tracking is enabled but we are not redirecting the notifications to any client.
See Also
sourcefn client_id(&mut self) -> PreparedCommand<'_, Self, i64>where
Self: Sized,
fn client_id(&mut self) -> PreparedCommand<'_, Self, i64>where
Self: Sized,
sourcefn client_info(&mut self) -> PreparedCommand<'_, Self, ClientInfo>where
Self: Sized,
fn client_info(&mut self) -> PreparedCommand<'_, Self, ClientInfo>where
Self: Sized,
sourcefn client_kill(
&mut self,
options: ClientKillOptions
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
fn client_kill(
&mut self,
options: ClientKillOptions
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
sourcefn client_list(
&mut self,
options: ClientListOptions
) -> PreparedCommand<'_, Self, ClientListResult>where
Self: Sized,
fn client_list(
&mut self,
options: ClientListOptions
) -> PreparedCommand<'_, Self, ClientListResult>where
Self: Sized,
sourcefn client_no_evict(&mut self, no_evict: bool) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn client_no_evict(&mut self, no_evict: bool) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
sets the client eviction
mode for the current connection.
See Also
sourcefn client_pause(
&mut self,
timeout: u64,
mode: ClientPauseMode
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn client_pause(
&mut self,
timeout: u64,
mode: ClientPauseMode
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
Connections control command able to suspend all the Redis clients for the specified amount of time (in milliseconds).
See Also
sourcefn client_reply(
&mut self,
mode: ClientReplyMode
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn client_reply(
&mut self,
mode: ClientReplyMode
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
Sometimes it can be useful for clients to completely disable replies from the Redis server.
See Also
sourcefn client_setname<CN>(
&mut self,
connection_name: CN
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
CN: Into<BulkString>,
fn client_setname<CN>(
&mut self,
connection_name: CN
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
CN: Into<BulkString>,
sourcefn client_tracking(
&mut self,
status: ClientTrackingStatus,
options: ClientTrackingOptions
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn client_tracking(
&mut self,
status: ClientTrackingStatus,
options: ClientTrackingOptions
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
This command enables the tracking feature of the Redis server,
that is used for server assisted client side caching
.
See Also
sourcefn client_trackinginfo(
&mut self
) -> PreparedCommand<'_, Self, ClientTrackingInfo>where
Self: Sized,
fn client_trackinginfo(
&mut self
) -> PreparedCommand<'_, Self, ClientTrackingInfo>where
Self: Sized,
This command enables the tracking feature of the Redis server,
that is used for server assisted client side caching
.
See Also
sourcefn client_unblock(
&mut self,
client_id: i64,
mode: ClientUnblockMode
) -> PreparedCommand<'_, Self, bool>where
Self: Sized,
fn client_unblock(
&mut self,
client_id: i64,
mode: ClientUnblockMode
) -> PreparedCommand<'_, Self, bool>where
Self: Sized,
This command can unblock, from a different connection,
a client blocked in a blocking operation,
such as for instance BRPOP
or XREAD
or WAIT
.
Return
true
- This command can unblock, from a different connection, a client blocked in a blocking operation, such as for instance BRPOP or XREAD or WAIT.false
- if the client wasn’t unblocked.
See Also
sourcefn client_unpause(&mut self) -> PreparedCommand<'_, Self, bool>where
Self: Sized,
fn client_unpause(&mut self) -> PreparedCommand<'_, Self, bool>where
Self: Sized,
Used to resume command processing for all clients that were
paused by client_pause
.
See Also
sourcefn echo<M, R>(&mut self, message: M) -> PreparedCommand<'_, Self, R>where
Self: Sized,
M: Into<BulkString>,
R: FromValue,
fn echo<M, R>(&mut self, message: M) -> PreparedCommand<'_, Self, R>where
Self: Sized,
M: Into<BulkString>,
R: FromValue,
sourcefn hello(
&mut self,
options: HelloOptions
) -> PreparedCommand<'_, Self, HelloResult>where
Self: Sized,
fn hello(
&mut self,
options: HelloOptions
) -> PreparedCommand<'_, Self, HelloResult>where
Self: Sized,
Switch to a different protocol, optionally authenticating and setting the connection’s name, or provide a contextual client report.
See Also
sourcefn ping<R>(&mut self, options: PingOptions) -> PreparedCommand<'_, Self, R>where
Self: Sized,
R: FromValue,
fn ping<R>(&mut self, options: PingOptions) -> PreparedCommand<'_, Self, R>where
Self: Sized,
R: FromValue,
Returns PONG if no argument is provided, otherwise return a copy of the argument as a bulk.
See Also
sourcefn quit(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn quit(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
sourcefn reset(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn reset(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
This command performs a full reset of the connection’s server-side context, mimicking the effect of disconnecting and reconnecting again.