pub struct PluginManager { /* private fields */ }
Expand description
The PluginManager exists to interface with the different plugins. It also has capabilities to dynamically modify those plugins.
Implementations§
Source§impl PluginManager
impl PluginManager
Sourcepub fn get_default_json_message(&self, hash: &str) -> Result<Value, Error>
pub fn get_default_json_message(&self, hash: &str) -> Result<Value, Error>
If we know the schema hash, we can get a default message of the hash type.
Sourcepub fn generate_message(
&self,
hash: &str,
template_name: &str,
) -> Result<String, Error>
pub fn generate_message( &self, hash: &str, template_name: &str, ) -> Result<String, Error>
Generate a string representation of the default message.
Sourcepub fn handle_msg_and_submsgs(
&self,
hash: &str,
data: &[u8],
) -> Result<(), Error>
pub fn handle_msg_and_submsgs( &self, hash: &str, data: &[u8], ) -> Result<(), Error>
Get the hashed library from the map, and call its exported “handle” function. Handle any unhandled submessages the handle(…) function wants us to.
Sourcepub fn load_all_plugins(&self) -> Result<(), Error>
pub fn load_all_plugins(&self) -> Result<(), Error>
TODO: SUPPORT MORE THAN JUST WINDOWS DLL FILES!!!
Sourcepub fn load_single_plugin(&self, filename: &str) -> Result<(), Error>
pub fn load_single_plugin(&self, filename: &str) -> Result<(), Error>
Load a single plugin given a filename
Sourcepub fn continuously_watch_for_new_plugins(&self, watch_path: &'static str)
pub fn continuously_watch_for_new_plugins(&self, watch_path: &'static str)
Continuously load from plugin directories
Auto Trait Implementations§
impl Freeze for PluginManager
impl RefUnwindSafe for PluginManager
impl Send for PluginManager
impl Sync for PluginManager
impl Unpin for PluginManager
impl UnwindSafe for PluginManager
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