Struct tarantool::tuple::FunctionCtx
source · [−]#[repr(C)]pub struct FunctionCtx { /* private fields */ }
Implementations
sourceimpl FunctionCtx
impl FunctionCtx
sourcepub fn return_tuple(&self, tuple: &Tuple) -> Result<c_int>
pub fn return_tuple(&self, tuple: &Tuple) -> Result<c_int>
Return a Tuple from stored C procedure.
Returned Tuple is automatically reference counted by Tarantool.
tuple
- a Tuple to return
sourcepub fn return_mp<T>(&self, value: &T) -> Result<c_int> where
T: Serialize,
pub fn return_mp<T>(&self, value: &T) -> Result<c_int> where
T: Serialize,
Return MessagePack from a stored C procedure. The MessagePack is copied, so it is safe to free/reuse the passed arguments after the call.
MessagePack is not validated, for the sake of speed. It is
expected to be a single encoded object. An attempt to encode
and return multiple objects without wrapping them into an
MP_ARRAY
or MP_MAP
is undefined behaviour.
value
- value to be encoded to MessagePack
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FunctionCtx
impl !Send for FunctionCtx
impl !Sync for FunctionCtx
impl Unpin for FunctionCtx
impl UnwindSafe for FunctionCtx
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more