pub struct NativePlugin { /* private fields */ }Expand description
Native plugin loaded from a dynamic library.
Implementations§
Source§impl NativePlugin
impl NativePlugin
Sourcepub fn load(path: &Path) -> Result<Self, PluginError>
pub fn load(path: &Path) -> Result<Self, PluginError>
Sourcepub const fn info(&self) -> &NativePluginInfo
pub const fn info(&self) -> &NativePluginInfo
Get plugin info.
Trait Implementations§
Source§impl Drop for NativePlugin
impl Drop for NativePlugin
Source§impl Plugin for NativePlugin
impl Plugin for NativePlugin
Source§fn hooks(&self) -> &[PluginHook]
fn hooks(&self) -> &[PluginHook]
Supported hooks.
Source§fn execute_hook<'life0, 'async_trait>(
&'life0 self,
hook: PluginHook,
data: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_hook<'life0, 'async_trait>(
&'life0 self,
hook: PluginHook,
data: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a hook.
Source§fn activate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn activate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Activate the plugin.
Source§fn deactivate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn deactivate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Deactivate the plugin.
Auto Trait Implementations§
impl Freeze for NativePlugin
impl RefUnwindSafe for NativePlugin
impl Send for NativePlugin
impl Sync for NativePlugin
impl Unpin for NativePlugin
impl UnwindSafe for NativePlugin
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more