#[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
调用其他插件
Trait Implementations§
Source§impl Clone for HostCallbacks
impl Clone for HostCallbacks
Source§fn clone(&self) -> HostCallbacks
fn clone(&self) -> HostCallbacks
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto 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