#[repr(C)]pub struct FunctionDesc {
pub name: FfiStr,
pub arities: *const u8,
pub arities_len: usize,
pub fun: Option<extern "C" fn(host: *const HostApi, args: *const GenericValue, nargs: usize) -> FfiReturn>,
}Expand description
Description of one exported plugin function.
Fields§
§name: FfiStrFunction name as seen from generic code.
arities: *const u8Accepted argument counts (the host checks arity before calling).
arities_len: usizeNumber of entries in arities.
fun: Option<extern "C" fn(host: *const HostApi, args: *const GenericValue, nargs: usize) -> FfiReturn>The function implementation; a null pointer is rejected at load.
The type is PluginFn spelled out inline - cbindgen only renders
a nullable C function pointer for an inline Option<fn>, not
through the alias.
Auto Trait Implementations§
impl !Send for FunctionDesc
impl !Sync for FunctionDesc
impl Freeze for FunctionDesc
impl RefUnwindSafe for FunctionDesc
impl Unpin for FunctionDesc
impl UnsafeUnpin for FunctionDesc
impl UnwindSafe for FunctionDesc
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