Trait Command

Source
pub trait Command {
    type Output;

    // Required methods
    fn to_request(self) -> Request;
    fn to_output(val: Response) -> Result<Self::Output, CommandError>;
}
Expand description

Trait implemented by types that can be used as redis commands

Required Associated Types§

Source

type Output

Command output type

Required Methods§

Source

fn to_request(self) -> Request

Convert command to a redis request

Source

fn to_output(val: Response) -> Result<Self::Output, CommandError>

Create command response from a redis response

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.

Implementors§