pub struct PluginFunction { /* private fields */ }
Implementations§
Source§impl PluginFunction
impl PluginFunction
pub fn new(func: fn(&PluginApi, Option<PluginValue>) -> PluginValue) -> Self
pub fn call(&self, api: &PluginApi, arg: Option<PluginValue>) -> PluginValue
Trait Implementations§
Source§impl Clone for PluginFunction
impl Clone for PluginFunction
Source§fn clone(&self) -> PluginFunction
fn clone(&self) -> PluginFunction
Returns a copy 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 PluginFunction
impl RefUnwindSafe for PluginFunction
impl Send for PluginFunction
impl Sync for PluginFunction
impl Unpin for PluginFunction
impl UnwindSafe for PluginFunction
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