#[repr(C)]pub struct FFI_SessionConfig {
pub config_options: FFI_ConfigOptions,
pub clone: unsafe extern "C" fn(plan: &Self) -> Self,
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 SessionConfig across FFI boundaries.
Instead of attempting to expose the entire SessionConfig interface, we
convert the config options into a map from a string to string and pass
those values across the FFI boundary. On the receiver side, we
reconstruct a SessionConfig from those values.
It is possible that using different versions of DataFusion across the FFI boundary could have differing expectations of the config options. This is a limitation of this approach, but exposing the entire SessionConfig via a FFI interface would be extensive and provide limited value over this version.
Fields§
§config_options: FFI_ConfigOptionsFFI stable configuration options.
clone: unsafe extern "C" fn(plan: &Self) -> SelfUsed to create a clone on the provider of the execution plan. This should only need to be called by the receiver of the plan.
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.
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 Clone for FFI_SessionConfig
impl Clone for FFI_SessionConfig
Source§impl Debug for FFI_SessionConfig
impl Debug for FFI_SessionConfig
Source§impl Drop for FFI_SessionConfig
impl Drop for FFI_SessionConfig
Source§impl From<&SessionConfig> for FFI_SessionConfig
impl From<&SessionConfig> for FFI_SessionConfig
Source§fn from(session: &SessionConfig) -> Self
fn from(session: &SessionConfig) -> Self
impl Send for FFI_SessionConfig
impl Sync for FFI_SessionConfig
Source§impl TryFrom<&FFI_SessionConfig> for SessionConfig
impl TryFrom<&FFI_SessionConfig> for SessionConfig
Source§type Error = DataFusionError
type Error = DataFusionError
Auto Trait Implementations§
impl Freeze for FFI_SessionConfig
impl RefUnwindSafe for FFI_SessionConfig
impl Unpin for FFI_SessionConfig
impl UnsafeUnpin for FFI_SessionConfig
impl UnwindSafe for FFI_SessionConfig
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
impl<T> Allocation for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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