pub struct ThemeConfig {Show 17 fields
pub registry: ThemeRegistry,
pub default_theme: String,
pub system_light_theme: String,
pub system_dark_theme: String,
pub storage_key: String,
pub attribute: String,
pub target: String,
pub duration_ms: u32,
pub easing: String,
pub reduced_motion: ThemeReducedMotion,
pub animation: ThemeAnimationMode,
pub animation_preset: ThemeAnimationPreset,
pub animation_storage_key: String,
pub animation_speed: u16,
pub animation_speed_storage_key: String,
pub isolate_view_transition_names: bool,
pub runtime_path: String,
}Fields§
§registry: ThemeRegistry§default_theme: String§system_light_theme: String§system_dark_theme: String§storage_key: String§attribute: String§target: String§duration_ms: u32§easing: String§reduced_motion: ThemeReducedMotion§animation: ThemeAnimationMode§animation_preset: ThemeAnimationPreset§animation_storage_key: String§animation_speed: u16§animation_speed_storage_key: String§isolate_view_transition_names: bool§runtime_path: StringImplementations§
Source§impl ThemeConfig
impl ThemeConfig
pub fn new() -> Self
pub fn with_registry(self, registry: ThemeRegistry) -> Self
pub fn registry(self, registry: ThemeRegistry) -> Self
pub fn with_theme(self, theme: ThemeDefinition) -> Self
pub fn theme(self, theme: ThemeDefinition) -> Self
pub fn add(self, theme: ThemeDefinition) -> Self
pub fn with_default_theme(self, theme: impl AsRef<str>) -> Self
pub fn default_theme(self, theme: impl AsRef<str>) -> Self
pub fn with_system_theme( self, light_theme: impl AsRef<str>, dark_theme: impl AsRef<str>, ) -> Self
pub fn system_theme( self, light_theme: impl AsRef<str>, dark_theme: impl AsRef<str>, ) -> Self
pub fn with_storage_key(self, storage_key: impl Into<String>) -> Self
pub fn storage(self, storage_key: impl Into<String>) -> Self
pub fn with_attribute(self, attribute: impl Into<String>) -> Self
pub fn attr(self, attribute: impl Into<String>) -> Self
pub fn with_target(self, target: impl Into<String>) -> Self
pub fn target(self, target: impl Into<String>) -> Self
pub fn with_duration_ms(self, duration_ms: u32) -> Self
pub fn dur(self, duration: Duration) -> Self
pub fn dur_ms(self, duration_ms: u32) -> Self
pub fn with_easing(self, easing: impl Into<String>) -> Self
pub fn ease(self, easing: impl Into<String>) -> Self
pub fn with_reduced_motion(self, reduced_motion: ThemeReducedMotion) -> Self
pub fn reduced(self, reduced_motion: ThemeReducedMotion) -> Self
pub fn with_animation(self, animation: ThemeAnimationMode) -> Self
pub fn anim(self, animation: ThemeAnimationMode) -> Self
pub fn with_animation_preset( self, animation_preset: ThemeAnimationPreset, ) -> Self
pub fn preset(self, animation_preset: ThemeAnimationPreset) -> Self
pub fn with_animation_storage_key( self, animation_storage_key: impl Into<String>, ) -> Self
pub fn anim_storage(self, animation_storage_key: impl Into<String>) -> Self
pub fn with_animation_speed(self, animation_speed: u16) -> Self
pub fn speed(self, animation_speed: u16) -> Self
pub fn with_animation_speed_storage_key( self, animation_speed_storage_key: impl Into<String>, ) -> Self
pub fn speed_storage( self, animation_speed_storage_key: impl Into<String>, ) -> Self
pub fn with_view_transition_name_isolation(self, isolate: bool) -> Self
pub fn isolate_names(self, isolate: bool) -> Self
pub fn with_runtime_path(self, runtime_path: impl Into<String>) -> Self
pub fn runtime(self, runtime_path: impl Into<String>) -> Self
pub fn motion(self, motion: ThemeMotion) -> Self
pub fn validate(&self) -> ThemeValidationReport
pub fn resolve_theme(&self, id: impl AsRef<str>) -> Option<&ThemeDefinition>
pub fn toggle_theme_id(&self, current: impl AsRef<str>) -> String
pub fn to_json(&self) -> Result<String, Error>
pub fn to_compact_json(&self) -> Result<String, Error>
pub fn to_preferred_json( &self, format: ThemeSerializationFormat, ) -> Result<String, Error>
pub fn with_route_profile(self, profile: ThemePresetProfile) -> Self
pub fn route_profile(self, profile: ThemePresetProfile) -> Self
pub fn cache_key(&self, route: Option<&str>) -> String
pub fn manifest_fragment( &self, policy: &ThemeRoutePolicy, ) -> ThemeManifestFragment
pub fn output_report(&self, policy: &ThemeRoutePolicy) -> ThemeOutputReport
pub fn explain(&self, policy: &ThemeRoutePolicy) -> ThemeExplainReport
pub fn try_validated(self) -> Result<Self, ThemeConfigError>
Trait Implementations§
Source§impl Add<ThemeDefinition> for ThemeConfig
impl Add<ThemeDefinition> for ThemeConfig
Source§type Output = ThemeConfig
type Output = ThemeConfig
The resulting type after applying the
+ operator.Source§impl Clone for ThemeConfig
impl Clone for ThemeConfig
Source§fn clone(&self) -> ThemeConfig
fn clone(&self) -> ThemeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ThemeConfig
impl Debug for ThemeConfig
Source§impl Default for ThemeConfig
impl Default for ThemeConfig
Source§impl<'de> Deserialize<'de> for ThemeConfig
impl<'de> Deserialize<'de> for ThemeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ThemeConfig
Source§impl PartialEq for ThemeConfig
impl PartialEq for ThemeConfig
Source§fn eq(&self, other: &ThemeConfig) -> bool
fn eq(&self, other: &ThemeConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ThemeConfig
impl Serialize for ThemeConfig
impl StructuralPartialEq for ThemeConfig
Auto Trait Implementations§
impl Freeze for ThemeConfig
impl RefUnwindSafe for ThemeConfig
impl Send for ThemeConfig
impl Sync for ThemeConfig
impl Unpin for ThemeConfig
impl UnsafeUnpin for ThemeConfig
impl UnwindSafe for ThemeConfig
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