#[repr(C)]pub struct FFI_TaskContext {
pub session_id: unsafe extern "C" fn(&Self) -> String,
pub task_id: unsafe extern "C" fn(&Self) -> FFI_Option<String>,
pub session_config: unsafe extern "C" fn(&Self) -> FFI_SessionConfig,
pub scalar_functions: unsafe extern "C" fn(&Self) -> Vec<(String, FFI_ScalarUDF)>,
pub aggregate_functions: unsafe extern "C" fn(&Self) -> Vec<(String, FFI_AggregateUDF)>,
pub window_functions: unsafe extern "C" fn(&Self) -> Vec<(String, FFI_WindowUDF)>,
pub release: unsafe extern "C" fn(arg: &mut Self),
pub private_data: *mut c_void,
pub library_marker_id: extern "C" fn() -> usize,
}Expand description
A stable struct for sharing TaskContext across FFI boundaries.
Fields§
§session_id: unsafe extern "C" fn(&Self) -> StringReturn the session ID.
task_id: unsafe extern "C" fn(&Self) -> FFI_Option<String>Return the task ID.
session_config: unsafe extern "C" fn(&Self) -> FFI_SessionConfigReturn the session configuration.
scalar_functions: unsafe extern "C" fn(&Self) -> Vec<(String, FFI_ScalarUDF)>Returns a vec of name-function pairs for scalar functions.
aggregate_functions: unsafe extern "C" fn(&Self) -> Vec<(String, FFI_AggregateUDF)>Returns a vec of name-function pairs for aggregate functions.
window_functions: unsafe extern "C" fn(&Self) -> Vec<(String, FFI_WindowUDF)>Returns a vec of name-function pairs for window functions.
release: unsafe extern "C" fn(arg: &mut Self)Release the memory of the private data when it is no longer being used.
private_data: *mut c_voidInternal data. This is only to be accessed by the provider of the plan. The foreign library should never attempt to access this data.
library_marker_id: extern "C" fn() -> usizeUtility to identify when FFI objects are accessed locally through
the foreign interface. See crate::get_library_marker_id and
the crate’s README.md for more information.
Trait Implementations§
Source§impl Debug for FFI_TaskContext
impl Debug for FFI_TaskContext
Source§impl Drop for FFI_TaskContext
impl Drop for FFI_TaskContext
Source§impl From<Arc<TaskContext>> for FFI_TaskContext
impl From<Arc<TaskContext>> for FFI_TaskContext
Source§fn from(ctx: Arc<TaskContext>) -> Self
fn from(ctx: Arc<TaskContext>) -> Self
Converts to this type from the input type.
Source§impl From<FFI_TaskContext> for Arc<TaskContext>
impl From<FFI_TaskContext> for Arc<TaskContext>
Source§fn from(ffi_ctx: FFI_TaskContext) -> Self
fn from(ffi_ctx: FFI_TaskContext) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Send for FFI_TaskContext
impl !Sync for FFI_TaskContext
impl Freeze for FFI_TaskContext
impl RefUnwindSafe for FFI_TaskContext
impl Unpin for FFI_TaskContext
impl UnsafeUnpin for FFI_TaskContext
impl UnwindSafe for FFI_TaskContext
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more