#[repr(C)]pub struct HostCallbacks {
pub send_to_frontend: extern "C" fn(*const c_char, *const c_char) -> bool,
pub get_app_config: extern "C" fn(*const c_char) -> *const c_char,
pub call_other_plugin: extern "C" fn(*const c_char, *const c_char) -> *const c_char,
}Expand description
主程序提供给插件的回调函数集合 这些函数指针在插件加载时由主程序传递给插件
Fields§
§send_to_frontend: extern "C" fn(*const c_char, *const c_char) -> bool向前端发送消息
get_app_config: extern "C" fn(*const c_char) -> *const c_char获取应用配置
call_other_plugin: extern "C" fn(*const c_char, *const c_char) -> *const c_char调用其他插件
Auto Trait Implementations§
impl Freeze for HostCallbacks
impl RefUnwindSafe for HostCallbacks
impl Send for HostCallbacks
impl Sync for HostCallbacks
impl Unpin for HostCallbacks
impl UnwindSafe for HostCallbacks
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