Struct PluginManager

Source
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

Source

pub fn new() -> Self

Create a new PluginManager

Source

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.

Source

pub fn generate_message( &self, hash: &str, template_name: &str, ) -> Result<String, Error>

Generate a string representation of the default message.

Source

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.

Source

pub fn load_all_plugins(&self) -> Result<(), Error>

TODO: SUPPORT MORE THAN JUST WINDOWS DLL FILES!!!

Source

pub fn load_single_plugin(&self, filename: &str) -> Result<(), Error>

Load a single plugin given a filename

Source

pub fn continuously_watch_for_new_plugins(&self, watch_path: &'static str)

Continuously load from plugin directories

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.