[][src]Struct rusty_tarantool::tarantool::packets::TarantoolResponse

pub struct TarantoolResponse {
    pub code: u64,
    pub data: Bytes,
}

Tarantool response struct

use any decode method to decode tarantool response to custom struct by serde please look examples https://github.com/zheludkovm/RustyTarantool/tree/master/examples

Fields

code: u64data: Bytes

Implementations

impl TarantoolResponse[src]

pub fn new(code: u64, data: Bytes) -> TarantoolResponse[src]

pub fn decode<'de, T>(self) -> Result<T> where
    T: Deserialize<'de>, 
[src]

decode tarantool response to any serder deserializable struct

pub fn decode_single<'de, T>(self) -> Result<T> where
    T: Deserialize<'de>, 
[src]

decode tarantool response to tuple wih one element and return this element

pub fn decode_pair<'de, T1, T2>(self) -> Result<(T1, T2)> where
    T1: Deserialize<'de>,
    T2: Deserialize<'de>, 
[src]

decode tarantool response to tuple of two elements

pub fn decode_trio<'de, T1, T2, T3>(self) -> Result<(T1, T2, T3)> where
    T1: Deserialize<'de>,
    T2: Deserialize<'de>,
    T3: Deserialize<'de>, 
[src]

decode tarantool response to three elements

Trait Implementations

impl Debug for TarantoolResponse[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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.