[−][src]Struct darkredis::Command
A struct for defining commands manually. If you want pipelining, use CommandList
.
Example
#![feature(async_await)] use darkredis::{Command, Connection}; let command = Command::new("SET").arg(b"singular-key").arg(b"some-value"); let result = connection.run_command(command).await.unwrap(); assert_eq!(result, Value::Ok);
Methods
impl<'a> Command<'a>
[src]
pub fn new(cmd: &'a str) -> Self
[src]
Create a new a.
pub fn arg<D>(self, data: &'a D) -> Self where
D: AsRef<[u8]>,
[src]
D: AsRef<[u8]>,
Append an argument to this command.
pub fn args<D>(self, arguments: &'a [D]) -> Self where
D: AsRef<[u8]>,
[src]
D: AsRef<[u8]>,
Add multiple arguments to a command in slice form.
Auto Trait Implementations
impl<'a> Sync for Command<'a>
impl<'a> Send for Command<'a>
impl<'a> Unpin for Command<'a>
impl<'a> RefUnwindSafe for Command<'a>
impl<'a> UnwindSafe for Command<'a>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,