[][src]Struct darkredis::Command

pub struct Command<'a> { /* fields omitted */ }

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]

Append an argument to this command.

pub fn args<D>(self, arguments: &'a [D]) -> Self where
    D: AsRef<[u8]>, 
[src]

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]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T