#[repr(C)]pub struct PluginVtable {
pub introspect: unsafe extern "C" fn(input_json: *const c_char, out_json: *mut *mut c_char) -> c_int,
pub free_string: unsafe extern "C" fn(ptr: *mut c_char),
}Expand description
Function pointer table. Every function takes and returns heap-allocated
null-terminated UTF-8 JSON strings the host must free via free_string.
Fields§
§introspect: unsafe extern "C" fn(input_json: *const c_char, out_json: *mut *mut c_char) -> c_intIntrospect the target.
input_json is a UTF-8 JSON document matching crate::SyncInput.
On success *out_json points to a plugin-owned JSON string of a
crate::schema::Schema; on failure *out_json is an error message.
Returns 0 on success, non-zero on error.
free_string: unsafe extern "C" fn(ptr: *mut c_char)Free a string previously returned by this plugin.
Auto Trait Implementations§
impl Freeze for PluginVtable
impl RefUnwindSafe for PluginVtable
impl Send for PluginVtable
impl Sync for PluginVtable
impl Unpin for PluginVtable
impl UnsafeUnpin for PluginVtable
impl UnwindSafe for PluginVtable
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