Struct streamduck_core::modules::ModuleManager
source · [−]pub struct ModuleManager { /* private fields */ }
Expand description
Manages modules
Implementations
sourceimpl ModuleManager
impl ModuleManager
sourcepub fn new() -> Arc<ModuleManager>
pub fn new() -> Arc<ModuleManager>
Creates new module manager, used in daemon for loading plugins and base modules
sourcepub fn add_module(&self, module: UniqueSDModule)
pub fn add_module(&self, module: UniqueSDModule)
Adds a new module to be used with core
sourcepub fn get_module(&self, name: &str) -> Option<UniqueSDModule>
pub fn get_module(&self, name: &str) -> Option<UniqueSDModule>
Attempts to get module with specified name
sourcepub fn get_modules(&self) -> HashMap<String, UniqueSDModule>
pub fn get_modules(&self) -> HashMap<String, UniqueSDModule>
Returns all modules in map format
sourcepub fn get_module_list(&self) -> Vec<UniqueSDModule>
pub fn get_module_list(&self) -> Vec<UniqueSDModule>
Returns all modules in vector format
sourcepub fn get_modules_from_list(&self, list: &[String]) -> Vec<UniqueSDModule>
pub fn get_modules_from_list(&self, list: &[String]) -> Vec<UniqueSDModule>
Returns modules from names provided if they exist
sourcepub fn get_modules_for_component(&self, component: &str) -> Vec<UniqueSDModule>
pub fn get_modules_for_component(&self, component: &str) -> Vec<UniqueSDModule>
Retrieves modules that are listening to a specified component
sourcepub fn get_modules_for_declared_components(
&self,
components: &[String]
) -> Vec<UniqueSDModule>
pub fn get_modules_for_declared_components(
&self,
components: &[String]
) -> Vec<UniqueSDModule>
Retrieves modules that have added specified components
sourcepub fn get_modules_for_components(
&self,
components: &[String]
) -> Vec<UniqueSDModule>
pub fn get_modules_for_components(
&self,
components: &[String]
) -> Vec<UniqueSDModule>
Retrieves modules that are listening to specified components
sourcepub fn get_components_of_module(
&self,
module_name: &str
) -> Option<HashMap<String, ComponentDefinition>>
pub fn get_components_of_module(
&self,
module_name: &str
) -> Option<HashMap<String, ComponentDefinition>>
Retrieves components that module defined
sourcepub fn get_components(
&self
) -> HashMap<String, (ComponentDefinition, UniqueSDModule)>
pub fn get_components(
&self
) -> HashMap<String, (ComponentDefinition, UniqueSDModule)>
Retrieves all components that all modules define
sourcepub fn get_module_component_map(
&self
) -> HashMap<String, HashMap<String, ComponentDefinition>>
pub fn get_module_component_map(
&self
) -> HashMap<String, HashMap<String, ComponentDefinition>>
Retrieves all components that all modules define, but in module to component map format
sourcepub fn get_rendering_module_map(
&self
) -> HashMap<String, HashMap<String, UniqueSDModule>>
pub fn get_rendering_module_map(
&self
) -> HashMap<String, HashMap<String, UniqueSDModule>>
Retrieves all modules that can render things
sourcepub fn get_modules_for_rendering(
&self,
names: &Vec<String>
) -> HashMap<String, UniqueSDModule>
pub fn get_modules_for_rendering(
&self,
names: &Vec<String>
) -> HashMap<String, UniqueSDModule>
Retrieves all modules that should be able to render according to list of component names
sourcepub fn get_component(
&self,
component_name: &str
) -> Option<(ComponentDefinition, UniqueSDModule)>
pub fn get_component(
&self,
component_name: &str
) -> Option<(ComponentDefinition, UniqueSDModule)>
Retrieves component if it exists
sourcepub fn read_module_map(
&self
) -> RwLockReadGuard<'_, HashMap<String, UniqueSDModule>>
pub fn read_module_map(
&self
) -> RwLockReadGuard<'_, HashMap<String, UniqueSDModule>>
Returns module map read lock
sourcepub fn read_component_map(
&self
) -> RwLockReadGuard<'_, HashMap<String, (ComponentDefinition, UniqueSDModule)>>
pub fn read_component_map(
&self
) -> RwLockReadGuard<'_, HashMap<String, (ComponentDefinition, UniqueSDModule)>>
Returns component map read lock
sourcepub fn read_module_component_map(
&self
) -> RwLockReadGuard<'_, HashMap<String, HashMap<String, ComponentDefinition>>>
pub fn read_module_component_map(
&self
) -> RwLockReadGuard<'_, HashMap<String, HashMap<String, ComponentDefinition>>>
Returns module component map read lock
sourcepub fn read_component_listener_map(
&self
) -> RwLockReadGuard<'_, HashMap<String, Vec<UniqueSDModule>>>
pub fn read_component_listener_map(
&self
) -> RwLockReadGuard<'_, HashMap<String, Vec<UniqueSDModule>>>
Returns component listener map read lock
sourcepub fn read_rendering_modules_map(
&self
) -> RwLockReadGuard<'_, HashMap<String, HashMap<String, UniqueSDModule>>>
pub fn read_rendering_modules_map(
&self
) -> RwLockReadGuard<'_, HashMap<String, HashMap<String, UniqueSDModule>>>
Returns rendering modules map read lock
Trait Implementations
sourceimpl Default for ModuleManager
impl Default for ModuleManager
sourcefn default() -> ModuleManager
fn default() -> ModuleManager
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ModuleManager
impl Send for ModuleManager
impl Sync for ModuleManager
impl Unpin for ModuleManager
impl UnwindSafe for ModuleManager
Blanket Implementations
sourceimpl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
sourcefn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified method Read more
sourcefn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford method by default Read more
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme,
type Err = NoError
type Err = NoError
The error type produced by a failed conversion.
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ConvUtil for T
impl<T> ConvUtil for T
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
sourceimpl<T, U> IntoColor<U> for T where
U: FromColor<T>,
impl<T, U> IntoColor<U> for T where
U: FromColor<T>,
sourcefn into_color(self) -> U
fn into_color(self) -> U
Convert into T with values clamped to the color defined bounds Read more
sourceimpl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
sourcefn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
sourcefn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian()
.
sourcefn read_from_big_endian(read: &mut R) -> Result<Self, Error>
fn read_from_big_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian()
.
sourcefn read_from_native_endian(read: &mut R) -> Result<Self, Error>
fn read_from_native_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian()
.
sourceimpl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
sourcefn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined
range, otherwise an OutOfBounds
error is returned which contains
the unclamped color. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
type Err = NoError
type Err = NoError
The error type produced by a failed conversion.
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>,
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>,
type Err = <Dst as ValueFrom<Src>>::Err
type Err = <Dst as ValueFrom<Src>>::Err
The error type produced by a failed conversion.
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
Convert the subject into an exactly equivalent representation.