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() -> ThemeConfig
pub fn with_registry(self, registry: ThemeRegistry) -> ThemeConfig
pub fn registry(self, registry: ThemeRegistry) -> ThemeConfig
pub fn with_theme(self, theme: ThemeDefinition) -> ThemeConfig
pub fn theme(self, theme: ThemeDefinition) -> ThemeConfig
pub fn add(self, theme: ThemeDefinition) -> ThemeConfig
pub fn with_default_theme(self, theme: impl AsRef<str>) -> ThemeConfig
pub fn default_theme(self, theme: impl AsRef<str>) -> ThemeConfig
pub fn with_system_theme( self, light_theme: impl AsRef<str>, dark_theme: impl AsRef<str>, ) -> ThemeConfig
pub fn system_theme( self, light_theme: impl AsRef<str>, dark_theme: impl AsRef<str>, ) -> ThemeConfig
pub fn with_storage_key(self, storage_key: impl Into<String>) -> ThemeConfig
pub fn storage(self, storage_key: impl Into<String>) -> ThemeConfig
pub fn with_attribute(self, attribute: impl Into<String>) -> ThemeConfig
pub fn attr(self, attribute: impl Into<String>) -> ThemeConfig
pub fn with_target(self, target: impl Into<String>) -> ThemeConfig
pub fn target(self, target: impl Into<String>) -> ThemeConfig
pub fn with_duration_ms(self, duration_ms: u32) -> ThemeConfig
pub fn dur(self, duration: Duration) -> ThemeConfig
pub fn dur_ms(self, duration_ms: u32) -> ThemeConfig
pub fn with_easing(self, easing: impl Into<String>) -> ThemeConfig
pub fn ease(self, easing: impl Into<String>) -> ThemeConfig
pub fn with_reduced_motion( self, reduced_motion: ThemeReducedMotion, ) -> ThemeConfig
pub fn reduced(self, reduced_motion: ThemeReducedMotion) -> ThemeConfig
pub fn with_animation(self, animation: ThemeAnimationMode) -> ThemeConfig
pub fn anim(self, animation: ThemeAnimationMode) -> ThemeConfig
pub fn with_animation_preset( self, animation_preset: ThemeAnimationPreset, ) -> ThemeConfig
pub fn preset(self, animation_preset: ThemeAnimationPreset) -> ThemeConfig
pub fn with_animation_storage_key( self, animation_storage_key: impl Into<String>, ) -> ThemeConfig
pub fn anim_storage( self, animation_storage_key: impl Into<String>, ) -> ThemeConfig
pub fn with_animation_speed(self, animation_speed: u16) -> ThemeConfig
pub fn speed(self, animation_speed: u16) -> ThemeConfig
pub fn with_animation_speed_storage_key( self, animation_speed_storage_key: impl Into<String>, ) -> ThemeConfig
pub fn speed_storage( self, animation_speed_storage_key: impl Into<String>, ) -> ThemeConfig
pub fn with_view_transition_name_isolation(self, isolate: bool) -> ThemeConfig
pub fn isolate_names(self, isolate: bool) -> ThemeConfig
pub fn with_runtime_path(self, runtime_path: impl Into<String>) -> ThemeConfig
pub fn runtime(self, runtime_path: impl Into<String>) -> ThemeConfig
pub fn motion(self, motion: ThemeMotion) -> ThemeConfig
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) -> ThemeConfig
pub fn route_profile(self, profile: ThemePresetProfile) -> ThemeConfig
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<ThemeConfig, 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§fn add(
self,
rhs: ThemeDefinition,
) -> <ThemeConfig as Add<ThemeDefinition>>::Output
fn add( self, rhs: ThemeDefinition, ) -> <ThemeConfig as Add<ThemeDefinition>>::Output
Performs the
+ operation. Read moreSource§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§fn default() -> ThemeConfig
fn default() -> ThemeConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ThemeConfig
impl<'de> Deserialize<'de> for ThemeConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThemeConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThemeConfig, <__D as Deserializer<'de>>::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
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ThemeConfig
Source§impl ThemeConfigDx for ThemeConfig
impl ThemeConfigDx 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
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<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.