Api

Struct Api 

Source
pub struct Api<O: Send + Sync + 'static, I: Info + 'static> { /* private fields */ }

Implementations§

Source§

impl<O: Send + Sync + 'static, I: Info + 'static> Api<O, I>

Source

pub fn registry(&self) -> &Registry<O>

Source

pub const fn plugin(&self) -> &Bundle

Source

pub const fn depends(&self) -> &Vec<Bundle>

Source

pub const fn optional_depends(&self) -> &Vec<Bundle>

Source

pub fn register_manager<M>( &self, manager: M, ) -> Result<(), RegisterManagerError>
where M: Manager<'static, O, I> + 'static,

Source

pub fn register_managers<M>( &self, managers: M, ) -> Result<(), RegisterManagerError>
where M: IntoIterator<Item = Box<dyn Manager<'static, O, I>>>,

Source

pub fn par_register_managers<M>( &self, managers: M, ) -> Result<(), RegisterManagerError>
where M: IntoParallelIterator<Item = Box<dyn Manager<'static, O, I>>>,

Source

pub fn unregister_manager( &self, format: &str, ) -> Result<(), UnregisterManagerError>

Source

pub fn get_manager_ref( &self, format: &str, ) -> Option<&Box<dyn Manager<'static, O, I>>>

Source

pub fn par_get_manager_ref( &self, format: &str, ) -> Option<&Box<dyn Manager<'static, O, I>>>

Source

pub fn get_manager_mut( &self, format: &str, ) -> Option<&mut Box<dyn Manager<'static, O, I>>>

Source

pub fn par_get_manager_mut( &self, format: &str, ) -> Option<&mut Box<dyn Manager<'static, O, I>>>

Source

pub fn register_plugin(&self, path: &str) -> Result<Bundle, RegisterPluginError>

Source

pub fn register_plugins<'b, P>( &self, paths: P, ) -> Result<Vec<Bundle>, RegisterPluginError>
where P: IntoIterator<Item = &'b str>,

Source

pub fn par_register_plugins<'b, P>( &self, paths: P, ) -> Result<Vec<Bundle>, RegisterPluginError>
where P: IntoParallelIterator<Item = &'b str>,

Source

pub fn unregister_plugin( &self, id: &str, version: &Version, ) -> Result<(), UnregisterPluginError>

Source

pub fn unregister_plugin_by_bundle( &self, bundle: &Bundle, ) -> Result<(), UnregisterPluginError>

Source

pub fn par_unregister_plugin_by_bundle( &self, bundle: &Bundle, ) -> Result<(), UnregisterPluginError>

Source

pub fn load_plugin( &self, id: &str, version: &Version, ) -> Result<(), LoadPluginError>

Source

pub fn par_load_plugin( &self, id: &str, version: &Version, ) -> Result<(), LoadPluginError>

Source

pub fn load_plugin_by_bundle( &self, bundle: &Bundle, ) -> Result<(), LoadPluginError>

Source

pub fn par_load_plugin_by_bundle( &self, bundle: &Bundle, ) -> Result<(), LoadPluginError>

Source

pub fn load_plugin_now( &self, path: &str, ) -> Result<Bundle, (Option<RegisterPluginError>, Option<LoadPluginError>)>

Source

pub fn load_plugins<'b, P>( &self, paths: P, ) -> Result<Vec<Bundle>, (Option<RegisterPluginError>, Option<LoadPluginError>)>
where P: IntoIterator<Item = &'b str>,

Source

pub fn par_load_plugins<'b, P>( &self, paths: P, ) -> Result<Vec<Bundle>, (Option<RegisterPluginError>, Option<LoadPluginError>)>
where P: IntoParallelIterator<Item = &'b str>,

Source

pub fn load_only_used_plugins<'b, P>( &self, paths: P, ) -> Result<Vec<Bundle>, (Option<RegisterPluginError>, Option<UnregisterPluginError>, Option<LoadPluginError>)>
where P: IntoIterator<Item = &'b str>,

Source

pub fn par_load_only_used_plugins<'b, P>( &self, paths: P, ) -> Result<Vec<Bundle>, (Option<RegisterPluginError>, Option<UnregisterPluginError>, Option<LoadPluginError>)>
where P: IntoParallelIterator<Item = &'b str>,

Source

pub fn unload_plugin( &self, id: &str, version: &Version, ) -> Result<(), UnloadPluginError>

Source

pub fn par_unload_plugin( &self, id: &str, version: &Version, ) -> Result<(), UnloadPluginError>

Source

pub fn unload_plugin_by_bundle( &self, bundle: &Bundle, ) -> Result<(), UnloadPluginError>

Source

pub fn par_unload_plugin_by_bundle( &self, bundle: &Bundle, ) -> Result<(), UnloadPluginError>

Source

pub fn get_plugin( &self, id: &str, version: &Version, ) -> Option<&Plugin<'static, O, I>>

Source

pub fn par_get_plugin( &self, id: &str, version: &Version, ) -> Option<&Plugin<'static, O, I>>

Source

pub fn get_plugin_by_bundle( &self, bundle: &Bundle, ) -> Option<&Plugin<'static, O, I>>

Source

pub fn par_get_plugin_by_bundle( &self, bundle: &Bundle, ) -> Option<&Plugin<'static, O, I>>

Source

pub fn get_plugin_mut( &self, id: &str, version: &Version, ) -> Option<&mut Plugin<'static, O, I>>

Source

pub fn par_get_plugin_mut( &self, id: &str, version: &Version, ) -> Option<&mut Plugin<'static, O, I>>

Source

pub fn get_plugin_mut_by_bundle( &self, bundle: &Bundle, ) -> Option<&mut Plugin<'static, O, I>>

Source

pub fn par_get_plugin_mut_by_bundle( &self, bundle: &Bundle, ) -> Option<&mut Plugin<'static, O, I>>

Source

pub fn get_plugins_by_id(&self, id: &str) -> Vec<&Plugin<'static, O, I>>

Source

pub fn par_get_plugins_by_id(&self, id: &str) -> Vec<&Plugin<'static, O, I>>

Source

pub fn get_plugins_by_id_mut(&self, id: &str) -> Vec<&mut Plugin<'static, O, I>>

Source

pub fn par_get_plugins_by_id_mut( &self, id: &str, ) -> Vec<&mut Plugin<'static, O, I>>

Source

pub fn get_plugins(&self) -> &Vec<Plugin<'static, O, I>>

Source

pub fn get_registry(&self) -> &Registry<O>

Source

pub fn get_requests(&self) -> &Requests

Source

pub fn call_request( &self, name: &str, args: &[Variable], ) -> Result<Vec<O>, PluginCallRequestError>

Source

pub fn par_call_request( &self, name: &str, args: &[Variable], ) -> Result<Vec<O>, PluginCallRequestError>

Source

pub fn call_function_depend( &self, id: &str, version: &Version, name: &str, args: &[Variable], ) -> Result<O, CallFunctionDependError>

Source

pub fn call_function_optional_depend( &self, id: &str, version: &Version, name: &str, args: &[Variable], ) -> Result<Option<O>, PluginCallFunctionError>

Auto Trait Implementations§

§

impl<O, I> !Freeze for Api<O, I>

§

impl<O, I> !RefUnwindSafe for Api<O, I>

§

impl<O, I> Send for Api<O, I>

§

impl<O, I> Sync for Api<O, I>

§

impl<O, I> Unpin for Api<O, I>

§

impl<O, I> !UnwindSafe for Api<O, I>

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.