pub trait FromResp: Sized {
    // Required method
    fn from_resp_int(resp: RespValue) -> Result<Self, Error>;

    // Provided method
    fn from_resp(resp: RespValue) -> Result<Self, Error> { ... }
}
Expand description

A trait to be implemented for every time which can be read from a RESP value.

Implementing this trait on a type means that type becomes a valid return type for calls such as send on client::PairedConnection

Required Methods§

Provided Methods§

source

fn from_resp(resp: RespValue) -> Result<Self, Error>

Return a Result containing either Self or Error. Errors can occur due to either: a) the particular RespValue being incompatible with the required type, or b) a remote Redis error occuring.

Implementations on Foreign Types§

source§

impl FromResp for usize

source§

impl FromResp for String

source§

impl FromResp for i32

source§

impl FromResp for u32

source§

impl FromResp for Vec<u8>

source§

impl<K: FromResp + Hash + Eq, T: FromResp, S: BuildHasher + Default> FromResp for HashMap<K, T, S>

source§

impl FromResp for bool

source§

impl FromResp for u64

source§

impl FromResp for isize

source§

impl<A, B, C> FromResp for (A, B, C)where A: FromResp, B: FromResp, C: FromResp,

source§

impl FromResp for i64

source§

impl FromResp for Arc<str>

source§

impl<A, B> FromResp for (A, B)where A: FromResp, B: FromResp,

source§

impl FromResp for ()

source§

impl<T: FromResp> FromResp for Vec<T>

source§

impl<T: FromResp> FromResp for Option<T>

Implementors§