Trait redis_async::resp::FromResp
[−]
[src]
pub trait FromResp: Sized { fn from_resp_int(resp: RespValue) -> Result<Self, Error>; fn from_resp(resp: RespValue) -> Result<Self, Error> { ... } }
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
fn from_resp_int(resp: RespValue) -> Result<Self, Error>
Provided Methods
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
impl FromResp for String
[src]
impl FromResp for Vec<u8>
[src]
impl FromResp for i64
[src]
impl FromResp for usize
[src]
impl<T: FromResp> FromResp for Option<T>
[src]
impl<T: FromResp> FromResp for Vec<T>
[src]
impl FromResp for ()
[src]
Implementors
impl FromResp for RespValue