Struct PreparedFunctionCall

Source
pub struct PreparedFunctionCall { /* private fields */ }

Implementations§

Source§

impl PreparedFunctionCall

Source

pub async fn execute(self) -> Result<TarantoolResponse>

call tarantool stored procedure

params mast be serializable to MsgPack tuple by Serde - rust tuple or vector or struct (by default structs serialized as tuple)

order of fields in serializes tuple is order od parameters of procedure

§Examples

lua function on tarantool

function test(a,b)
  return a,b,11
 end

rust code

 let response = client
        .prepare_fn_call("test")
        .bind_ref(&("aa", "aa"))?
        .bind(1)?
        .execute().await?;

Trait Implementations§

Source§

impl ExecWithParamaters for PreparedFunctionCall

Source§

fn bind_raw(self, param: Vec<u8>) -> Result<PreparedFunctionCall>

bind raw parameter

Source§

fn bind_named_ref<T: Serialize, T1: Into<String>>( self, name: T1, param: &T, ) -> Result<Self>
where Self: Sized,

bind named parameter
Source§

fn bind_ref<T: Serialize>(self, param: &T) -> Result<Self>
where Self: Sized,

bind parameter
Source§

fn bind_named<T, T1>(self, name: T1, param: T) -> Result<Self>
where T: Serialize, Self: Sized, T1: Into<String>,

bind named parameter
Source§

fn bind<T>(self, param: T) -> Result<Self>
where T: Serialize, Self: Sized,

bind parameter
Source§

fn bind_null(self) -> Result<Self>
where Self: Sized,

bind null
Source§

fn bind_named_null<T1>(self, name: T1) -> Result<Self>
where Self: Sized, T1: Into<String>,

bind named null as parameter

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.