Struct embedded_redis::commands::custom::CustomCommand
source · pub struct CustomCommand { /* private fields */ }Expand description
Abstraction for arbitrary commands.
Implementations§
source§impl CustomCommand
impl CustomCommand
pub fn new(builder: CommandBuilder) -> Self
Trait Implementations§
source§impl<F> Command<F> for CustomCommandwhere
F: From<CommandBuilder>,
impl<F> Command<F> for CustomCommandwhere F: From<CommandBuilder>,
§type Response = F
type Response = F
Response type, either a custom evaluated “high-level” response or the original RESP frame
source§fn eval_response(&self, frame: F) -> Result<Self::Response, ResponseTypeError>
fn eval_response(&self, frame: F) -> Result<Self::Response, ResponseTypeError>
The command has the ability to evaluate the response frame and craft its own high level
response from that.
Its also possible to just return 1:1 the RESP2 frame. Read more
source§impl From<CommandBuilder> for CustomCommand
impl From<CommandBuilder> for CustomCommand
source§fn from(builder: CommandBuilder) -> Self
fn from(builder: CommandBuilder) -> Self
Converts to this type from the input type.