pub struct TextFxConfig {Show 23 fields
pub id: String,
pub text: String,
pub effect: TextFxEffect,
pub timing: TextFxTiming,
pub split: TextSplit,
pub reduced_motion: ReducedMotion,
pub performance_profile: TextFxPerformanceProfile,
pub gpu_budget: TextFxGpuBudget,
pub render_preference: TextFxRenderPreference,
pub layout_reserve: TextFxLayoutReserve,
pub trigger: TextFxTrigger,
pub direction: TextFxDirection,
pub playback: TextFxPlayback,
pub intensity: f32,
pub palette: Vec<String>,
pub charset: String,
pub cursor: bool,
pub from: Option<f64>,
pub to: Option<f64>,
pub fx: Option<String>,
pub lifecycle: TextFxLifecycle,
pub marks: Vec<TokenMark>,
pub choreography: Vec<TextFxChoreography>,
}Fields§
§id: String§text: String§effect: TextFxEffect§timing: TextFxTiming§split: TextSplit§reduced_motion: ReducedMotion§performance_profile: TextFxPerformanceProfile§gpu_budget: TextFxGpuBudget§render_preference: TextFxRenderPreference§layout_reserve: TextFxLayoutReserve§trigger: TextFxTrigger§direction: TextFxDirection§playback: TextFxPlayback§intensity: f32§palette: Vec<String>§charset: String§cursor: bool§from: Option<f64>§to: Option<f64>§fx: Option<String>§lifecycle: TextFxLifecycle§marks: Vec<TokenMark>§choreography: Vec<TextFxChoreography>Implementations§
Source§impl TextFxConfig
impl TextFxConfig
pub fn new(id: impl Into<String>, text: impl Into<String>) -> TextFxConfig
pub fn with_text(self, text: impl Into<String>) -> TextFxConfig
pub fn content(self, text: impl Into<String>) -> TextFxConfig
pub fn from_fx( id: impl Into<String>, text: impl Into<String>, fx: impl Into<String>, ) -> Result<TextFxConfig, TextFxParseError>
pub fn profile( id: impl Into<String>, text: impl Into<String>, profile: TextFxProfile, ) -> TextFxConfig
pub fn with_profile(self, profile: TextFxProfile) -> TextFxConfig
pub fn profile_preset(self, profile: TextFxProfile) -> TextFxConfig
pub fn with_effect(self, effect: TextFxEffect) -> TextFxConfig
pub fn effect(self, effect: TextFxEffect) -> TextFxConfig
pub fn fade(self) -> TextFxConfig
pub fn slide(self) -> TextFxConfig
pub fn blur(self) -> TextFxConfig
pub fn scale(self) -> TextFxConfig
pub fn typewriter(self) -> TextFxConfig
pub fn scramble(self) -> TextFxConfig
pub fn staggered(self) -> TextFxConfig
pub fn with_timing(self, timing: TextFxTiming) -> TextFxConfig
pub fn timing(self, timing: TextFxTiming) -> TextFxConfig
pub fn with_duration_ms(self, duration_ms: u32) -> TextFxConfig
pub fn dur_ms(self, duration_ms: u32) -> TextFxConfig
pub fn dur(self, duration: Duration) -> TextFxConfig
pub fn with_delay_ms(self, delay_ms: u32) -> TextFxConfig
pub fn delay_ms(self, delay_ms: u32) -> TextFxConfig
pub fn with_speed_ms(self, speed_ms: u32) -> TextFxConfig
pub fn speed_ms(self, speed_ms: u32) -> TextFxConfig
pub fn with_stagger_ms(self, stagger_ms: u32) -> TextFxConfig
pub fn stagger_ms(self, stagger_ms: u32) -> TextFxConfig
pub fn stagger(self, stagger: Duration) -> TextFxConfig
pub fn with_enter_effect(self, effect: TextFxEffect) -> TextFxConfig
pub fn enter(self, effect: TextFxEffect) -> TextFxConfig
pub fn with_enter_delay_ms(self, delay_ms: u32) -> TextFxConfig
pub fn enter_delay_ms(self, delay_ms: u32) -> TextFxConfig
pub fn with_enter_duration_ms(self, duration_ms: u32) -> TextFxConfig
pub fn enter_dur_ms(self, duration_ms: u32) -> TextFxConfig
pub fn with_enter_stagger_ms(self, stagger_ms: u32) -> TextFxConfig
pub fn enter_stagger_ms(self, stagger_ms: u32) -> TextFxConfig
pub fn with_exit_effect(self, effect: TextFxEffect) -> TextFxConfig
pub fn exit(self, effect: TextFxEffect) -> TextFxConfig
pub fn with_exit_delay_ms(self, delay_ms: u32) -> TextFxConfig
pub fn exit_delay_ms(self, delay_ms: u32) -> TextFxConfig
pub fn with_exit_duration_ms(self, duration_ms: u32) -> TextFxConfig
pub fn exit_dur_ms(self, duration_ms: u32) -> TextFxConfig
pub fn with_exit_stagger_ms(self, stagger_ms: u32) -> TextFxConfig
pub fn exit_stagger_ms(self, stagger_ms: u32) -> TextFxConfig
pub fn with_exit_reverse_of_enter(self) -> TextFxConfig
pub fn exit_reverse(self) -> TextFxConfig
pub fn with_easing(self, easing: TextFxEasing) -> TextFxConfig
pub fn ease(self, easing: TextFxEasing) -> TextFxConfig
pub fn with_split(self, split: TextSplit) -> TextFxConfig
pub fn split(self, split: TextSplit) -> TextFxConfig
pub fn split_lines(self) -> TextFxConfig
pub fn with_performance_profile( self, profile: TextFxPerformanceProfile, ) -> TextFxConfig
pub fn perf(self, profile: TextFxPerformanceProfile) -> TextFxConfig
pub fn with_gpu_budget(self, budget: TextFxGpuBudget) -> TextFxConfig
pub fn gpu(self, budget: TextFxGpuBudget) -> TextFxConfig
pub fn with_render_preference( self, preference: TextFxRenderPreference, ) -> TextFxConfig
pub fn render(self, preference: TextFxRenderPreference) -> TextFxConfig
pub fn with_layout_reserve(self, reserve: TextFxLayoutReserve) -> TextFxConfig
pub fn reserve(self, reserve: TextFxLayoutReserve) -> TextFxConfig
pub fn css_first(self) -> TextFxConfig
pub fn balanced(self) -> TextFxConfig
pub fn visual_exact(self) -> TextFxConfig
pub fn gpu_auto(self) -> TextFxConfig
pub fn gpu_low_power(self) -> TextFxConfig
pub fn gpu_normal(self) -> TextFxConfig
pub fn gpu_exact(self) -> TextFxConfig
pub fn workertown_render(self) -> TextFxConfig
pub fn layout_reserve_off(self) -> TextFxConfig
pub fn layout_reserve_auto(self) -> TextFxConfig
pub fn layout_reserve_exact(self) -> TextFxConfig
pub fn with_trigger(self, trigger: TextFxTrigger) -> TextFxConfig
pub fn trigger(self, trigger: TextFxTrigger) -> TextFxConfig
pub fn on_hover(self) -> TextFxConfig
pub fn on_click(self) -> TextFxConfig
pub fn split_words(self) -> TextFxConfig
pub fn split_chars(self) -> TextFxConfig
pub fn loop_count(self, count: u16) -> TextFxConfig
pub fn loop_infinite(self) -> TextFxConfig
pub fn reverse(self) -> TextFxConfig
pub fn alternate(self) -> TextFxConfig
pub fn yoyo(self) -> TextFxConfig
pub fn target(self, target: TokenTarget, action: TokenAction) -> TextFxConfig
pub fn add_target(&mut self, target: TokenTarget, action: TokenAction)
pub fn with_reduced_motion(self, reduced_motion: ReducedMotion) -> TextFxConfig
pub fn reduced(self, reduced_motion: ReducedMotion) -> TextFxConfig
pub fn with_direction(self, direction: TextFxDirection) -> TextFxConfig
pub fn direction(self, direction: TextFxDirection) -> TextFxConfig
pub fn with_palette( self, palette: impl IntoIterator<Item = impl Into<String>>, ) -> TextFxConfig
pub fn palette( self, palette: impl IntoIterator<Item = impl Into<String>>, ) -> TextFxConfig
pub fn with_numbers(self, from: f64, to: f64) -> TextFxConfig
pub fn nums(self, from: f64, to: f64) -> TextFxConfig
pub fn with_cursor(self, cursor: bool) -> TextFxConfig
pub fn cursor(self, cursor: bool) -> TextFxConfig
pub fn with_charset(self, charset: impl Into<String>) -> TextFxConfig
pub fn charset(self, charset: impl Into<String>) -> TextFxConfig
pub fn to_json(&self) -> Result<String, Error>
pub fn to_compact_json(&self) -> Result<String, Error>
pub fn data_attr(&self) -> Result<String, Error>
pub fn locale_data_attr(&self) -> Result<String, Error>
pub fn is_css_first(&self) -> bool
pub fn is_css_first_split(&self) -> bool
pub fn is_css_first_renderable(&self) -> bool
pub fn css_first_class(&self) -> Option<String>
pub fn css_first_state_attrs(&self) -> Option<String>
pub fn reserves_layout(&self) -> bool
pub fn layout_reserve_attr(&self) -> Option<String>
pub fn layout_fallback_lines(&self) -> usize
pub fn live_contrast_mode(&self) -> Option<TextFxLiveContrast>
pub fn live_contrast_attr(&self) -> Option<String>
pub fn requires_workertown_render(&self) -> bool
pub fn trigger_attr(&self) -> Option<&'static str>
pub fn resume_trigger_attr(&self) -> Option<String>
pub fn html_attrs(&self) -> Result<String, Error>
pub fn static_html( &self, tag: impl AsRef<str>, extra_attrs: impl AsRef<str>, ) -> Result<String, Error>
pub fn with_route_profile(self, profile: TextFxPresetProfile) -> TextFxConfig
pub fn route_profile(self, profile: TextFxPresetProfile) -> TextFxConfig
pub fn cache_key(&self, route: Option<&str>) -> String
pub fn diagnostics( &self, verbosity: TextFxDiagnosticVerbosity, ) -> TextFxDiagnosticReport
pub fn explain(&self, policy: &TextFxRoutePolicy) -> TextFxExplainReport
Trait Implementations§
Source§impl Clone for TextFxConfig
impl Clone for TextFxConfig
Source§fn clone(&self) -> TextFxConfig
fn clone(&self) -> TextFxConfig
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 TextFxConfig
impl Debug for TextFxConfig
Source§impl Default for TextFxConfig
impl Default for TextFxConfig
Source§fn default() -> TextFxConfig
fn default() -> TextFxConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TextFxConfig
impl<'de> Deserialize<'de> for TextFxConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TextFxConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TextFxConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TextFxConfig
impl PartialEq for TextFxConfig
Source§fn eq(&self, other: &TextFxConfig) -> bool
fn eq(&self, other: &TextFxConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TextFxConfig
impl Serialize for TextFxConfig
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 TextFxConfig
Auto Trait Implementations§
impl Freeze for TextFxConfig
impl RefUnwindSafe for TextFxConfig
impl Send for TextFxConfig
impl Sync for TextFxConfig
impl Unpin for TextFxConfig
impl UnsafeUnpin for TextFxConfig
impl UnwindSafe for TextFxConfig
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.