pub struct FFIOperatorLoader { /* private fields */ }Expand description
FFI operator loader for dynamic libraries This is meant to be used as a singleton via get_global_loader()
Implementations§
Source§impl FFIOperatorLoader
impl FFIOperatorLoader
pub fn load_operator_library(&mut self, path: &Path) -> FFIResult<bool>
Sourcepub fn register_operator(
&mut self,
path: &Path,
) -> FFIResult<Option<LoadedOperatorInfo>>
pub fn register_operator( &mut self, path: &Path, ) -> FFIResult<Option<LoadedOperatorInfo>>
Register an operator library without instantiating it
This loads the library, validates it as an operator, and extracts metadata without creating an operator instance. Use this for discovery/registration.
§Arguments
path- Path to the shared library file
§Returns
Ok(Some(LoadedOperatorInfo))- Successfully registered operator with full metadataOk(None)- Library is not a valid FFI operator (silently skipped)Err(FFIError)- Loading or validation failed
Sourcepub fn load_operator(
&mut self,
path: &Path,
config: &[u8],
operator_id: FlowNodeId,
) -> FFIResult<Option<FFIOperator>>
pub fn load_operator( &mut self, path: &Path, config: &[u8], operator_id: FlowNodeId, ) -> FFIResult<Option<FFIOperator>>
Load an operator from a dynamic library
§Arguments
path- Path to the shared library fileconfig- Operator configuration dataoperator_id- ID for this operator instance
§Returns
Ok(Some(FFIOperator))- Successfully loaded operatorOk(None)- Library is not a valid FFI operator (silently skipped)Err(FFIError)- Loading or initialization failed
Sourcepub fn create_operator_by_name(
&mut self,
operator: &str,
operator_id: FlowNodeId,
config: &[u8],
) -> FFIResult<FFIOperator>
pub fn create_operator_by_name( &mut self, operator: &str, operator_id: FlowNodeId, config: &[u8], ) -> FFIResult<FFIOperator>
Sourcepub fn has_operator(&self, operator: &str) -> bool
pub fn has_operator(&self, operator: &str) -> bool
Check if an operator name is registered
Sourcepub fn unload_library(&mut self, path: &Path) -> FFIResult<()>
pub fn unload_library(&mut self, path: &Path) -> FFIResult<()>
Sourcepub fn loaded_count(&self) -> usize
pub fn loaded_count(&self) -> usize
Get the number of loaded libraries
Sourcepub fn list_loaded_operators(&self) -> Vec<LoadedOperatorInfo>
pub fn list_loaded_operators(&self) -> Vec<LoadedOperatorInfo>
List all loaded operators with their metadata
Trait Implementations§
Source§impl Default for FFIOperatorLoader
impl Default for FFIOperatorLoader
Auto Trait Implementations§
impl Freeze for FFIOperatorLoader
impl RefUnwindSafe for FFIOperatorLoader
impl Send for FFIOperatorLoader
impl Sync for FFIOperatorLoader
impl Unpin for FFIOperatorLoader
impl UnwindSafe for FFIOperatorLoader
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