Struct tarantool::tuple::FunctionCtx
source · #[repr(C)]pub struct FunctionCtx { /* private fields */ }
Expand description
FunctionCtx
Implementations§
source§impl 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 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 + ?Sized,
pub fn return_mp<T>(&self, value: &T) -> Result<c_int>where T: Serialize + ?Sized,
Return a value encoded as MessagePack from a stored procedure.
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
sourcepub fn return_bytes(&self, bytes: &[u8]) -> Result<c_int>
pub fn return_bytes(&self, bytes: &[u8]) -> Result<c_int>
Return raw bytes representing a MessagePack value from a stored procedure.
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.
bytes
- raw msgpack bytes to be returned
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§
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