pub trait ServerInterface: ClientLike {
// Provided methods
fn bgrewriteaof<R>(&self) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue { ... }
fn bgsave<R>(&self) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue { ... }
fn dbsize<R>(&self) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue { ... }
fn select<I>(&self, index: I) -> impl Future<Output = FredResult<()>> + Send
where I: TryInto<Value> + Send,
I::Error: Into<Error> + Send { ... }
fn failover(
&self,
to: Option<(String, u16)>,
force: bool,
abort: bool,
timeout: Option<u32>,
) -> impl Future<Output = FredResult<()>> + Send { ... }
fn lastsave<R>(&self) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue { ... }
fn wait<R>(
&self,
numreplicas: i64,
timeout: i64,
) -> impl Future<Output = Result<R, Error>> + Send
where R: FromValue { ... }
fn sentinel_primary(&self) -> Option<Server> { ... }
fn sentinel_nodes(&self) -> Option<Vec<Server>> { ... }
}i-server only.Expand description
Functions that implement the server interface.
Provided Methods§
Sourcefn bgrewriteaof<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn bgrewriteaof<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Instruct Redis to start an Append Only File rewrite process.
Sourcefn bgsave<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn bgsave<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Save the DB in background.
Sourcefn dbsize<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn dbsize<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Return the number of keys in the selected database.
Sourcefn select<I>(&self, index: I) -> impl Future<Output = FredResult<()>> + Send
fn select<I>(&self, index: I) -> impl Future<Output = FredResult<()>> + Send
Select the database this client should use.
Sourcefn failover(
&self,
to: Option<(String, u16)>,
force: bool,
abort: bool,
timeout: Option<u32>,
) -> impl Future<Output = FredResult<()>> + Send
fn failover( &self, to: Option<(String, u16)>, force: bool, abort: bool, timeout: Option<u32>, ) -> impl Future<Output = FredResult<()>> + Send
This command will start a coordinated failover between the currently-connected-to master and one of its replicas.
Sourcefn lastsave<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
fn lastsave<R>(&self) -> impl Future<Output = FredResult<R>> + Sendwhere
R: FromValue,
Return the UNIX TIME of the last DB save executed with success.
Sourcefn wait<R>(
&self,
numreplicas: i64,
timeout: i64,
) -> impl Future<Output = Result<R, Error>> + Sendwhere
R: FromValue,
fn wait<R>(
&self,
numreplicas: i64,
timeout: i64,
) -> impl Future<Output = Result<R, Error>> + Sendwhere
R: FromValue,
This command blocks the current client until all the previous write commands are successfully transferred and acknowledged by at least the specified number of replicas. If the timeout, specified in milliseconds, is reached, the command returns even if the specified number of replicas were not yet reached.
Sourcefn sentinel_primary(&self) -> Option<Server>
fn sentinel_primary(&self) -> Option<Server>
Read the primary Redis server identifier returned from the sentinel nodes.
Sourcefn sentinel_nodes(&self) -> Option<Vec<Server>>
fn sentinel_nodes(&self) -> Option<Vec<Server>>
Read the set of known sentinel nodes.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.