#[repr(C)]pub struct KernelVTable {
pub create: Option<unsafe extern "C" fn(*mut c_void) -> *mut c_void>,
pub get_contract: Option<unsafe extern "C" fn(*mut c_void, *mut c_void)>,
pub open: Option<unsafe extern "C" fn(*mut c_void, *mut c_void) -> i32>,
pub process: Option<unsafe extern "C" fn(*mut c_void, *mut c_void) -> i32>,
pub close: Option<unsafe extern "C" fn(*mut c_void, *mut c_void) -> i32>,
pub destroy: Option<unsafe extern "C" fn(*mut c_void)>,
}Expand description
算子的函数指针表(布局与 include/flow.h 的 LMFlowKernelVTable 一致)。
ctx/contract 参数在 C 侧是 LMFlowContext*/LMFlowContract*,此处用 *mut c_void
以免模块间循环依赖;ffi 层负责转换。
Fields§
§create: Option<unsafe extern "C" fn(*mut c_void) -> *mut c_void>§get_contract: Option<unsafe extern "C" fn(*mut c_void, *mut c_void)>§open: Option<unsafe extern "C" fn(*mut c_void, *mut c_void) -> i32>§process: Option<unsafe extern "C" fn(*mut c_void, *mut c_void) -> i32>§close: Option<unsafe extern "C" fn(*mut c_void, *mut c_void) -> i32>§destroy: Option<unsafe extern "C" fn(*mut c_void)>Trait Implementations§
Source§impl Clone for KernelVTable
impl Clone for KernelVTable
Source§fn clone(&self) -> KernelVTable
fn clone(&self) -> KernelVTable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for KernelVTable
Auto Trait Implementations§
impl Freeze for KernelVTable
impl RefUnwindSafe for KernelVTable
impl Send for KernelVTable
impl Sync for KernelVTable
impl Unpin for KernelVTable
impl UnsafeUnpin for KernelVTable
impl UnwindSafe for KernelVTable
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