pub struct TarantoolResponse {
pub code: u64,
pub data: Bytes,
pub sql_metadata: Option<Bytes>,
pub sql_info: Option<Bytes>,
}Expand description
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: u64§data: Bytes§sql_metadata: Option<Bytes>§sql_info: Option<Bytes>Implementations§
Source§impl TarantoolResponse
impl TarantoolResponse
pub fn new_short_response(code: u64, data: Bytes) -> TarantoolResponse
pub fn new_full_response( code: u64, data: Bytes, sql_metadata: Option<Bytes>, sql_info: Option<Bytes>, ) -> TarantoolResponse
Sourcepub fn decode<'de, T>(self) -> Result<T>where
T: Deserialize<'de>,
pub fn decode<'de, T>(self) -> Result<T>where
T: Deserialize<'de>,
decode tarantool response to any serder deserializable struct
Sourcepub fn decode_result_set<'de, T>(self) -> Result<Vec<T>>where
T: Deserialize<'de>,
pub fn decode_result_set<'de, T>(self) -> Result<Vec<T>>where
T: Deserialize<'de>,
decode tarantool response to any serder deserializable struct
Sourcepub fn decode_single<'de, T>(self) -> Result<T>where
T: Deserialize<'de>,
pub fn decode_single<'de, T>(self) -> Result<T>where
T: Deserialize<'de>,
decode tarantool response to tuple wih one element and return this element
Sourcepub fn decode_pair<'de, T1, T2>(self) -> Result<(T1, T2)>where
T1: Deserialize<'de>,
T2: Deserialize<'de>,
pub fn decode_pair<'de, T1, T2>(self) -> Result<(T1, T2)>where
T1: Deserialize<'de>,
T2: Deserialize<'de>,
decode tarantool response to tuple of two elements
Sourcepub fn decode_trio<'de, T1, T2, T3>(self) -> Result<(T1, T2, T3)>
pub fn decode_trio<'de, T1, T2, T3>(self) -> Result<(T1, T2, T3)>
decode tarantool response to three elements
Trait Implementations§
Source§impl Debug for TarantoolResponse
impl Debug for TarantoolResponse
Source§impl Into<TarantoolSqlResponse> for TarantoolResponse
impl Into<TarantoolSqlResponse> for TarantoolResponse
Source§fn into(self) -> TarantoolSqlResponse
fn into(self) -> TarantoolSqlResponse
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl !Freeze for TarantoolResponse
impl RefUnwindSafe for TarantoolResponse
impl Send for TarantoolResponse
impl Sync for TarantoolResponse
impl Unpin for TarantoolResponse
impl UnsafeUnpin for TarantoolResponse
impl UnwindSafe for TarantoolResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more