pub trait ConnectionCommands<'a> {
Show 22 methods
// Provided methods
fn auth<U, P>(
self,
username: Option<U>,
password: P,
) -> PreparedCommand<'a, Self, ()>
where Self: Sized,
U: SingleArg,
P: SingleArg { ... }
fn client_caching(
self,
mode: ClientCachingMode,
) -> PreparedCommand<'a, Self, Option<()>>
where Self: Sized { ... }
fn client_getname<CN>(self) -> PreparedCommand<'a, Self, Option<CN>>
where Self: Sized,
CN: PrimitiveResponse + DeserializeOwned { ... }
fn client_getredir(self) -> PreparedCommand<'a, Self, i64>
where Self: Sized { ... }
fn client_id(self) -> PreparedCommand<'a, Self, i64>
where Self: Sized { ... }
fn client_info(self) -> PreparedCommand<'a, Self, ClientInfo>
where Self: Sized { ... }
fn client_kill(
self,
options: ClientKillOptions,
) -> PreparedCommand<'a, Self, usize>
where Self: Sized { ... }
fn client_list(
self,
options: ClientListOptions,
) -> PreparedCommand<'a, Self, ClientListResult>
where Self: Sized { ... }
fn client_no_evict(self, no_evict: bool) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn client_pause(
self,
timeout: u64,
mode: ClientPauseMode,
) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn client_reply(
self,
mode: ClientReplyMode,
) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn client_setname<CN>(
self,
connection_name: CN,
) -> PreparedCommand<'a, Self, ()>
where Self: Sized,
CN: SingleArg { ... }
fn client_tracking(
self,
status: ClientTrackingStatus,
options: ClientTrackingOptions,
) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn client_trackinginfo(
self,
) -> PreparedCommand<'a, Self, ClientTrackingInfo>
where Self: Sized { ... }
fn client_unblock(
self,
client_id: i64,
mode: ClientUnblockMode,
) -> PreparedCommand<'a, Self, bool>
where Self: Sized { ... }
fn client_unpause(self) -> PreparedCommand<'a, Self, bool>
where Self: Sized { ... }
fn echo<M, R>(self, message: M) -> PreparedCommand<'a, Self, R>
where Self: Sized,
M: SingleArg,
R: PrimitiveResponse { ... }
fn hello(
self,
options: HelloOptions,
) -> PreparedCommand<'a, Self, HelloResult>
where Self: Sized { ... }
fn ping<R>(self, options: PingOptions) -> PreparedCommand<'a, Self, R>
where Self: Sized,
R: PrimitiveResponse { ... }
fn quit(self) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn reset(self) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
fn select(self, index: usize) -> PreparedCommand<'a, Self, ()>
where Self: Sized { ... }
}
Expand description
A group of Redis commands related to connection management
§See Also
Provided Methods§
Sourcefn auth<U, P>(
self,
username: Option<U>,
password: P,
) -> PreparedCommand<'a, Self, ()>
fn auth<U, P>( self, username: Option<U>, password: P, ) -> PreparedCommand<'a, Self, ()>
Sourcefn client_caching(
self,
mode: ClientCachingMode,
) -> PreparedCommand<'a, Self, Option<()>>where
Self: Sized,
fn client_caching(
self,
mode: ClientCachingMode,
) -> PreparedCommand<'a, 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>(self) -> PreparedCommand<'a, Self, Option<CN>>
fn client_getname<CN>(self) -> PreparedCommand<'a, Self, Option<CN>>
Sourcefn client_getredir(self) -> PreparedCommand<'a, Self, i64>where
Self: Sized,
fn client_getredir(self) -> PreparedCommand<'a, 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(self) -> PreparedCommand<'a, Self, i64>where
Self: Sized,
fn client_id(self) -> PreparedCommand<'a, Self, i64>where
Self: Sized,
Sourcefn client_info(self) -> PreparedCommand<'a, Self, ClientInfo>where
Self: Sized,
fn client_info(self) -> PreparedCommand<'a, Self, ClientInfo>where
Self: Sized,
Sourcefn client_kill(
self,
options: ClientKillOptions,
) -> PreparedCommand<'a, Self, usize>where
Self: Sized,
fn client_kill(
self,
options: ClientKillOptions,
) -> PreparedCommand<'a, Self, usize>where
Self: Sized,
Sourcefn client_list(
self,
options: ClientListOptions,
) -> PreparedCommand<'a, Self, ClientListResult>where
Self: Sized,
fn client_list(
self,
options: ClientListOptions,
) -> PreparedCommand<'a, Self, ClientListResult>where
Self: Sized,
Sourcefn client_no_evict(self, no_evict: bool) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn client_no_evict(self, no_evict: bool) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
sets the client eviction
mode for the current connection.
§See Also
Sourcefn client_pause(
self,
timeout: u64,
mode: ClientPauseMode,
) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn client_pause(
self,
timeout: u64,
mode: ClientPauseMode,
) -> PreparedCommand<'a, 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(self, mode: ClientReplyMode) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn client_reply(self, mode: ClientReplyMode) -> PreparedCommand<'a, 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>(
self,
connection_name: CN,
) -> PreparedCommand<'a, Self, ()>
fn client_setname<CN>( self, connection_name: CN, ) -> PreparedCommand<'a, Self, ()>
Sourcefn client_tracking(
self,
status: ClientTrackingStatus,
options: ClientTrackingOptions,
) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn client_tracking(
self,
status: ClientTrackingStatus,
options: ClientTrackingOptions,
) -> PreparedCommand<'a, 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(self) -> PreparedCommand<'a, Self, ClientTrackingInfo>where
Self: Sized,
fn client_trackinginfo(self) -> PreparedCommand<'a, 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(
self,
client_id: i64,
mode: ClientUnblockMode,
) -> PreparedCommand<'a, Self, bool>where
Self: Sized,
fn client_unblock(
self,
client_id: i64,
mode: ClientUnblockMode,
) -> PreparedCommand<'a, 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(self) -> PreparedCommand<'a, Self, bool>where
Self: Sized,
fn client_unpause(self) -> PreparedCommand<'a, 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>(self, message: M) -> PreparedCommand<'a, Self, R>
fn echo<M, R>(self, message: M) -> PreparedCommand<'a, Self, R>
Sourcefn hello(self, options: HelloOptions) -> PreparedCommand<'a, Self, HelloResult>where
Self: Sized,
fn hello(self, options: HelloOptions) -> PreparedCommand<'a, 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>(self, options: PingOptions) -> PreparedCommand<'a, Self, R>where
Self: Sized,
R: PrimitiveResponse,
fn ping<R>(self, options: PingOptions) -> PreparedCommand<'a, Self, R>where
Self: Sized,
R: PrimitiveResponse,
Returns PONG if no argument is provided, otherwise return a copy of the argument as a bulk.
§See Also
Sourcefn quit(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn quit(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
Sourcefn reset(self) -> PreparedCommand<'a, Self, ()>where
Self: Sized,
fn reset(self) -> PreparedCommand<'a, 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.