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>
impl<O: Send + Sync + 'static, I: Info + 'static> Api<O, I>
pub fn registry(&self) -> &Registry<O>
pub const fn plugin(&self) -> &Bundle
pub const fn depends(&self) -> &Vec<Bundle>
pub const fn optional_depends(&self) -> &Vec<Bundle>
pub fn register_manager<M>(
&self,
manager: M,
) -> Result<(), RegisterManagerError>where
M: Manager<'static, O, I> + 'static,
pub fn register_managers<M>( &self, managers: M, ) -> Result<(), RegisterManagerError>
pub fn par_register_managers<M>( &self, managers: M, ) -> Result<(), RegisterManagerError>
pub fn unregister_manager( &self, format: &str, ) -> Result<(), UnregisterManagerError>
pub fn get_manager_ref( &self, format: &str, ) -> Option<&Box<dyn Manager<'static, O, I>>>
pub fn par_get_manager_ref( &self, format: &str, ) -> Option<&Box<dyn Manager<'static, O, I>>>
pub fn get_manager_mut( &self, format: &str, ) -> Option<&mut Box<dyn Manager<'static, O, I>>>
pub fn par_get_manager_mut( &self, format: &str, ) -> Option<&mut Box<dyn Manager<'static, O, I>>>
pub fn register_plugin(&self, path: &str) -> Result<Bundle, RegisterPluginError>
pub fn register_plugins<'b, P>(
&self,
paths: P,
) -> Result<Vec<Bundle>, RegisterPluginError>where
P: IntoIterator<Item = &'b str>,
pub fn par_register_plugins<'b, P>(
&self,
paths: P,
) -> Result<Vec<Bundle>, RegisterPluginError>where
P: IntoParallelIterator<Item = &'b str>,
pub fn unregister_plugin( &self, id: &str, version: &Version, ) -> Result<(), UnregisterPluginError>
pub fn unregister_plugin_by_bundle( &self, bundle: &Bundle, ) -> Result<(), UnregisterPluginError>
pub fn par_unregister_plugin_by_bundle( &self, bundle: &Bundle, ) -> Result<(), UnregisterPluginError>
pub fn load_plugin( &self, id: &str, version: &Version, ) -> Result<(), LoadPluginError>
pub fn par_load_plugin( &self, id: &str, version: &Version, ) -> Result<(), LoadPluginError>
pub fn load_plugin_by_bundle( &self, bundle: &Bundle, ) -> Result<(), LoadPluginError>
pub fn par_load_plugin_by_bundle( &self, bundle: &Bundle, ) -> Result<(), LoadPluginError>
pub fn load_plugin_now( &self, path: &str, ) -> Result<Bundle, (Option<RegisterPluginError>, Option<LoadPluginError>)>
pub fn load_plugins<'b, P>(
&self,
paths: P,
) -> Result<Vec<Bundle>, (Option<RegisterPluginError>, Option<LoadPluginError>)>where
P: IntoIterator<Item = &'b str>,
pub fn par_load_plugins<'b, P>(
&self,
paths: P,
) -> Result<Vec<Bundle>, (Option<RegisterPluginError>, Option<LoadPluginError>)>where
P: IntoParallelIterator<Item = &'b str>,
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>,
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>,
pub fn unload_plugin( &self, id: &str, version: &Version, ) -> Result<(), UnloadPluginError>
pub fn par_unload_plugin( &self, id: &str, version: &Version, ) -> Result<(), UnloadPluginError>
pub fn unload_plugin_by_bundle( &self, bundle: &Bundle, ) -> Result<(), UnloadPluginError>
pub fn par_unload_plugin_by_bundle( &self, bundle: &Bundle, ) -> Result<(), UnloadPluginError>
pub fn get_plugin( &self, id: &str, version: &Version, ) -> Option<&Plugin<'static, O, I>>
pub fn par_get_plugin( &self, id: &str, version: &Version, ) -> Option<&Plugin<'static, O, I>>
pub fn get_plugin_by_bundle( &self, bundle: &Bundle, ) -> Option<&Plugin<'static, O, I>>
pub fn par_get_plugin_by_bundle( &self, bundle: &Bundle, ) -> Option<&Plugin<'static, O, I>>
pub fn get_plugin_mut( &self, id: &str, version: &Version, ) -> Option<&mut Plugin<'static, O, I>>
pub fn par_get_plugin_mut( &self, id: &str, version: &Version, ) -> Option<&mut Plugin<'static, O, I>>
pub fn get_plugin_mut_by_bundle( &self, bundle: &Bundle, ) -> Option<&mut Plugin<'static, O, I>>
pub fn par_get_plugin_mut_by_bundle( &self, bundle: &Bundle, ) -> Option<&mut Plugin<'static, O, I>>
pub fn get_plugins_by_id(&self, id: &str) -> Vec<&Plugin<'static, O, I>>
pub fn par_get_plugins_by_id(&self, id: &str) -> Vec<&Plugin<'static, O, I>>
pub fn get_plugins_by_id_mut(&self, id: &str) -> Vec<&mut Plugin<'static, O, I>>
pub fn par_get_plugins_by_id_mut( &self, id: &str, ) -> Vec<&mut Plugin<'static, O, I>>
pub fn get_plugins(&self) -> &Vec<Plugin<'static, O, I>>
pub fn get_registry(&self) -> &Registry<O>
pub fn get_requests(&self) -> &Requests
pub fn call_request( &self, name: &str, args: &[Variable], ) -> Result<Vec<O>, PluginCallRequestError>
pub fn par_call_request( &self, name: &str, args: &[Variable], ) -> Result<Vec<O>, PluginCallRequestError>
pub fn call_function_depend( &self, id: &str, version: &Version, name: &str, args: &[Variable], ) -> Result<O, CallFunctionDependError>
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> 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> 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