pub struct CoreModule { /* private fields */ }
Expand description
The core module, for exposing renderer component to requests and such
Trait Implementations§
Source§impl SDModule for CoreModule
impl SDModule for CoreModule
Source§fn components(&self) -> HashMap<String, ComponentDefinition>
fn components(&self) -> HashMap<String, ComponentDefinition>
Definition for components that module will be providing
Source§fn add_component<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
__arg1: CoreHandle,
button: &'life1 mut Button,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_component<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
__arg1: CoreHandle,
button: &'life1 mut Button,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Method for adding components onto buttons
Source§fn remove_component<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
__arg1: CoreHandle,
button: &'life1 mut Button,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn remove_component<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
__arg1: CoreHandle,
button: &'life1 mut Button,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Method for removing components from buttons
Source§fn paste_component<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
__arg1: CoreHandle,
reference_button: &'life1 Button,
new_button: &'life2 mut Button,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn paste_component<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
__arg1: CoreHandle,
reference_button: &'life1 Button,
new_button: &'life2 mut Button,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Method for handling pasting components of plugin, can be used for any additional handling
Source§fn component_values<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
core: CoreHandle,
button: &'life1 Button,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Vec<UIValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn component_values<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
core: CoreHandle,
button: &'life1 Button,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Vec<UIValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Method for letting core know what values component currently has
Source§fn set_component_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
core: CoreHandle,
button: &'life1 mut Button,
name: &'life2 str,
value: Vec<UIValue>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_component_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
core: CoreHandle,
button: &'life1 mut Button,
name: &'life2 str,
value: Vec<UIValue>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Method for setting values on components
Source§fn listening_for(&self) -> Vec<String>
fn listening_for(&self) -> Vec<String>
Specifies which components the module will be receiving events for
Source§fn settings<'life0, 'async_trait>(
&'life0 self,
core_manager: Arc<CoreManager>,
) -> Pin<Box<dyn Future<Output = Vec<UIValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn settings<'life0, 'async_trait>(
&'life0 self,
core_manager: Arc<CoreManager>,
) -> Pin<Box<dyn Future<Output = Vec<UIValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Current settings state of the plugin
Source§fn set_setting<'life0, 'async_trait>(
&'life0 self,
core_manager: Arc<CoreManager>,
value: Vec<UIValue>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_setting<'life0, 'async_trait>(
&'life0 self,
core_manager: Arc<CoreManager>,
value: Vec<UIValue>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Method for updating plugin settings from UI
Source§fn global_event<'life0, 'async_trait>(
&'life0 self,
event: SDGlobalEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn global_event<'life0, 'async_trait>(
&'life0 self,
event: SDGlobalEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Method for handling global events, add GLOBAL_EVENTS feature to the plugin metadata to receive global events
Source§fn event<'life0, 'async_trait>(
&'life0 self,
core: CoreHandle,
event: SDCoreEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn event<'life0, 'async_trait>(
&'life0 self,
core: CoreHandle,
event: SDCoreEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Method for handling core events, add CORE_EVENTS feature to the plugin metadata to receive core events
Source§fn metadata(&self) -> PluginMetadata
fn metadata(&self) -> PluginMetadata
Metadata of the module, auto-implemented for plugins from plugin metadata
Source§fn render<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
core: CoreHandle,
button: &'life1 UniqueButton,
frame: &'life2 mut DynamicImage,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn render<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
core: CoreHandle,
button: &'life1 UniqueButton,
frame: &'life2 mut DynamicImage,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Method renderer will run for rendering additional information on a button if RENDERING feature was specified
Source§fn render_hash(
&self,
core: CoreHandle,
button: &UniqueButton,
hash: &mut Box<dyn Hasher>,
)
fn render_hash( &self, core: CoreHandle, button: &UniqueButton, hash: &mut Box<dyn Hasher>, )
Method for telling renderer if anything changed Read more
Auto Trait Implementations§
impl Freeze for CoreModule
impl !RefUnwindSafe for CoreModule
impl Send for CoreModule
impl Sync for CoreModule
impl Unpin for CoreModule
impl !UnwindSafe for CoreModule
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§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.
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
Source§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.
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, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.
Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Convert into T with values clamped to the color defined bounds Read more
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn 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
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn 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