pub struct ModuleAssembler { /* private fields */ }Expand description
Registry-like assembler for loaded module implementations.
Implementations§
Source§impl ModuleAssembler
impl ModuleAssembler
pub fn new() -> Self
Sourcepub fn register_module(&mut self, module: Arc<dyn ModuleTrait>)
pub fn register_module(&mut self, module: Arc<dyn ModuleTrait>)
Registers a module implementation by its name.
pub fn remove_module(&mut self, name: &str)
pub fn remove_by_origin(&mut self, origin: &Path)
pub fn module_names(&self) -> Vec<String>
pub fn set_origin(&mut self, names: &[String], origin: &Path)
Sourcepub fn get_module(&self, name: &str) -> Option<Arc<dyn ModuleTrait>>
pub fn get_module(&self, name: &str) -> Option<Arc<dyn ModuleTrait>>
Returns a module by name.
pub fn get_all_modules(&self) -> Vec<Arc<dyn ModuleTrait>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ModuleAssembler
impl !UnwindSafe for ModuleAssembler
impl Freeze for ModuleAssembler
impl Send for ModuleAssembler
impl Sync for ModuleAssembler
impl Unpin for ModuleAssembler
impl UnsafeUnpin for ModuleAssembler
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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