pub struct DynamicPlugin { /* private fields */ }Expand description
A dynamically loaded plugin wrapper
Implementations§
Source§impl DynamicPlugin
impl DynamicPlugin
Sourcepub fn new(plugin: Box<dyn AgentPlugin>, library_path: PathBuf) -> Self
pub fn new(plugin: Box<dyn AgentPlugin>, library_path: PathBuf) -> Self
Create a new dynamic plugin
Sourcepub fn plugin(&self) -> &dyn AgentPlugin
pub fn plugin(&self) -> &dyn AgentPlugin
Get the inner plugin
Sourcepub fn plugin_mut(&mut self) -> &mut dyn AgentPlugin
pub fn plugin_mut(&mut self) -> &mut dyn AgentPlugin
Get mutable reference to the inner plugin
Sourcepub fn library_path(&self) -> &Path
pub fn library_path(&self) -> &Path
Get the library path
Sourcepub fn instance_id(&self) -> &str
pub fn instance_id(&self) -> &str
Get the instance ID
Sourcepub fn created_at(&self) -> Instant
pub fn created_at(&self) -> Instant
Get creation time
Sourcepub fn into_inner(self) -> Box<dyn AgentPlugin>
pub fn into_inner(self) -> Box<dyn AgentPlugin>
Consume and return the inner plugin
Auto Trait Implementations§
impl Freeze for DynamicPlugin
impl !RefUnwindSafe for DynamicPlugin
impl Send for DynamicPlugin
impl Sync for DynamicPlugin
impl Unpin for DynamicPlugin
impl UnsafeUnpin for DynamicPlugin
impl !UnwindSafe for DynamicPlugin
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