Struct tarantool_rs::CallResponse
source · pub struct CallResponse(_);Expand description
Tuple, returned from call and eval requests.
Implementations§
source§impl CallResponse
impl CallResponse
sourcepub fn decode_first<T>(self) -> Result<T, DecodingError>where
T: DeserializeOwned,
pub fn decode_first<T>(self) -> Result<T, DecodingError>where T: DeserializeOwned,
Decode first element of the tuple, dropping everything else.
This is useful if function doesn’t return an error.
sourcepub fn decode_two<T1, T2>(self) -> Result<(T1, T2), DecodingError>where
T1: DeserializeOwned,
T2: DeserializeOwned,
pub fn decode_two<T1, T2>(self) -> Result<(T1, T2), DecodingError>where T1: DeserializeOwned, T2: DeserializeOwned,
Decode first 2 elements of the tuple, dropping everything else.
sourcepub fn decode_result<T>(self) -> Result<T, Error>where
T: DeserializeOwned,
pub fn decode_result<T>(self) -> Result<T, Error>where T: DeserializeOwned,
Decode first two elements of the tuple into result, where
either first element deserialized into T and returned as Ok(T)
or second element returned as Err(Error::CallEval).
If second element is nil or not present, first element will be returned,
otherwise second element will be returned as error.
sourcepub fn decode_full<T>(self) -> Result<T, DecodingError>where
T: DeserializeOwned,
pub fn decode_full<T>(self) -> Result<T, DecodingError>where T: DeserializeOwned,
Decode entire response into type.
Note that currently every response would be a tuple, so be careful what type you are specifying.
Trait Implementations§
source§impl Clone for CallResponse
impl Clone for CallResponse
source§fn clone(&self) -> CallResponse
fn clone(&self) -> CallResponse
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for CallResponse
impl Debug for CallResponse
source§impl PartialEq<CallResponse> for CallResponse
impl PartialEq<CallResponse> for CallResponse
source§fn eq(&self, other: &CallResponse) -> bool
fn eq(&self, other: &CallResponse) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for CallResponse
Auto Trait Implementations§
impl RefUnwindSafe for CallResponse
impl Send for CallResponse
impl Sync for CallResponse
impl Unpin for CallResponse
impl UnwindSafe for CallResponse
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