#[repr(C)]pub struct FFI_SessionContext {
pub ctx: *mut c_void,
pub define_function: unsafe extern "C" fn(ctx: *mut c_void, function: FFI_ScalarFunction) -> c_int,
}Expand description
Host-side session context passed to a module’s init function.
The module calls define_function to register extensions.
Fields§
§ctx: *mut c_voidOpaque host-side context pointer.
define_function: unsafe extern "C" fn(ctx: *mut c_void, function: FFI_ScalarFunction) -> c_intRegister a scalar function with the host session.
The host takes ownership of function on success.
Returns 0 on success, non-zero on error.
Trait Implementations§
impl Send for FFI_SessionContext
impl Sync for FFI_SessionContext
Auto Trait Implementations§
impl Freeze for FFI_SessionContext
impl RefUnwindSafe for FFI_SessionContext
impl Unpin for FFI_SessionContext
impl UnsafeUnpin for FFI_SessionContext
impl UnwindSafe for FFI_SessionContext
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