pub struct SubscriptionConfig {
pub system_theme: bool,
pub message_name: String,
pub system_theme_variant: Option<String>,
}Expand description
Configuration for subscription code generation
Fields§
§system_theme: boolWhether to generate system theme subscription
message_name: StringName of the message enum
system_theme_variant: Option<String>Variant name for system theme changed message (e.g., “SystemThemeChanged”)
Implementations§
Source§impl SubscriptionConfig
impl SubscriptionConfig
Sourcepub fn from_theme_document(
theme_doc: Option<&ThemeDocument>,
message_name: &str,
) -> Self
pub fn from_theme_document( theme_doc: Option<&ThemeDocument>, message_name: &str, ) -> Self
Create subscription config from a theme document
If the theme document has follow_system: true, system theme subscription
will be enabled.
Sourcepub fn with_system_theme_variant(self, variant: impl Into<String>) -> Self
pub fn with_system_theme_variant(self, variant: impl Into<String>) -> Self
Set the system theme variant name
Trait Implementations§
Source§impl Clone for SubscriptionConfig
impl Clone for SubscriptionConfig
Source§fn clone(&self) -> SubscriptionConfig
fn clone(&self) -> SubscriptionConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SubscriptionConfig
impl Debug for SubscriptionConfig
Auto Trait Implementations§
impl Freeze for SubscriptionConfig
impl RefUnwindSafe for SubscriptionConfig
impl Send for SubscriptionConfig
impl Sync for SubscriptionConfig
impl Unpin for SubscriptionConfig
impl UnwindSafe for SubscriptionConfig
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