[][src]Struct libaster::redis::resp::Resp

pub struct Resp {
    pub rtype: RespType,
    pub data: Option<Vec<u8>>,
    pub array: Option<Vec<Resp>>,
}

Fields

rtype: RespTypedata: Option<Vec<u8>>array: Option<Vec<Resp>>

Methods

impl Resp[src]

pub fn new_plain(rtype: RespType, data: Option<Vec<u8>>) -> Resp[src]

pub fn new_array(array: Option<Vec<Resp>>) -> Resp[src]

pub fn parse(src: &[u8]) -> AsResult<Self>[src]

pub fn write_len(dst: &mut BytesMut, len: usize) -> AsResult<usize>[src]

pub fn cmd_bytes(&self) -> &[u8][src]

pub fn get(&self, i: usize) -> Option<&Self>[src]

pub fn get_mut(&mut self, i: usize) -> Option<&mut Self>[src]

pub fn is_inline(&self) -> bool[src]

pub fn unwrap_data(self) -> Option<Vec<u8>>[src]

Trait Implementations

impl Clone for Resp[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl From<Resp> for Cmd[src]

impl From<Resp> for Command[src]

impl Debug for Resp[src]

Auto Trait Implementations

impl Send for Resp

impl Sync for Resp

Blanket Implementations

impl<T> From for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto 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> Erased for T