Struct embedded_redis::commands::builder::CommandBuilder
source · pub struct CommandBuilder { /* private fields */ }Expand description
Builder for constructing RESP2/3 frames
Implementations§
source§impl CommandBuilder
impl CommandBuilder
pub fn new(keyword: &'static str) -> Self
sourcepub fn to_command(self) -> CustomCommand
pub fn to_command(self) -> CustomCommand
Converts builder to command ready for being sent by Client
sourcepub fn arg_static(self, arg: &'static str) -> Self
pub fn arg_static(self, arg: &'static str) -> Self
Adds a static argument
sourcepub fn arg_static_option(self, arg: Option<&'static str>) -> Self
pub fn arg_static_option(self, arg: Option<&'static str>) -> Self
Adds a static argument
sourcepub fn arg(self, arg: &Bytes) -> Self
pub fn arg(self, arg: &Bytes) -> Self
Adds a byte argument Note: Besides static, the most efficient way caused by the nature how Bytes cloning is working
sourcepub fn arg_option(self, arg: Option<&Bytes>) -> Self
pub fn arg_option(self, arg: Option<&Bytes>) -> Self
Just adding byte if option is Some
Trait Implementations§
source§impl Clone for CommandBuilder
impl Clone for CommandBuilder
source§fn clone(&self) -> CommandBuilder
fn clone(&self) -> CommandBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Default for CommandBuilder
impl Default for CommandBuilder
source§fn default() -> CommandBuilder
fn default() -> CommandBuilder
Returns the “default value” for a type. 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.
source§impl From<CommandBuilder> for Resp2Frame
impl From<CommandBuilder> for Resp2Frame
source§fn from(builder: CommandBuilder) -> Self
fn from(builder: CommandBuilder) -> Self
Converts to this type from the input type.
source§impl From<CommandBuilder> for Resp3Frame
impl From<CommandBuilder> for Resp3Frame
source§fn from(builder: CommandBuilder) -> Self
fn from(builder: CommandBuilder) -> Self
Converts to this type from the input type.