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>) -> Self
pub fn with_text(self, text: impl Into<String>) -> Self
pub fn content(self, text: impl Into<String>) -> Self
pub fn from_fx( id: impl Into<String>, text: impl Into<String>, fx: impl Into<String>, ) -> Result<Self, TextFxParseError>
pub fn profile( id: impl Into<String>, text: impl Into<String>, profile: TextFxProfile, ) -> Self
pub fn with_profile(self, profile: TextFxProfile) -> Self
pub fn profile_preset(self, profile: TextFxProfile) -> Self
pub fn with_effect(self, effect: TextFxEffect) -> Self
pub fn effect(self, effect: TextFxEffect) -> Self
pub fn fade(self) -> Self
pub fn slide(self) -> Self
pub fn blur(self) -> Self
pub fn scale(self) -> Self
pub fn typewriter(self) -> Self
pub fn scramble(self) -> Self
pub fn staggered(self) -> Self
pub fn with_timing(self, timing: TextFxTiming) -> Self
pub fn timing(self, timing: TextFxTiming) -> Self
pub fn with_duration_ms(self, duration_ms: u32) -> Self
pub fn dur_ms(self, duration_ms: u32) -> Self
pub fn dur(self, duration: Duration) -> Self
pub fn with_delay_ms(self, delay_ms: u32) -> Self
pub fn delay_ms(self, delay_ms: u32) -> Self
pub fn with_speed_ms(self, speed_ms: u32) -> Self
pub fn speed_ms(self, speed_ms: u32) -> Self
pub fn with_stagger_ms(self, stagger_ms: u32) -> Self
pub fn stagger_ms(self, stagger_ms: u32) -> Self
pub fn stagger(self, stagger: Duration) -> Self
pub fn with_enter_effect(self, effect: TextFxEffect) -> Self
pub fn enter(self, effect: TextFxEffect) -> Self
pub fn with_enter_delay_ms(self, delay_ms: u32) -> Self
pub fn enter_delay_ms(self, delay_ms: u32) -> Self
pub fn with_enter_duration_ms(self, duration_ms: u32) -> Self
pub fn enter_dur_ms(self, duration_ms: u32) -> Self
pub fn with_enter_stagger_ms(self, stagger_ms: u32) -> Self
pub fn enter_stagger_ms(self, stagger_ms: u32) -> Self
pub fn with_exit_effect(self, effect: TextFxEffect) -> Self
pub fn exit(self, effect: TextFxEffect) -> Self
pub fn with_exit_delay_ms(self, delay_ms: u32) -> Self
pub fn exit_delay_ms(self, delay_ms: u32) -> Self
pub fn with_exit_duration_ms(self, duration_ms: u32) -> Self
pub fn exit_dur_ms(self, duration_ms: u32) -> Self
pub fn with_exit_stagger_ms(self, stagger_ms: u32) -> Self
pub fn exit_stagger_ms(self, stagger_ms: u32) -> Self
pub fn with_exit_reverse_of_enter(self) -> Self
pub fn exit_reverse(self) -> Self
pub fn with_easing(self, easing: TextFxEasing) -> Self
pub fn ease(self, easing: TextFxEasing) -> Self
pub fn with_split(self, split: TextSplit) -> Self
pub fn split(self, split: TextSplit) -> Self
pub fn split_lines(self) -> Self
pub fn with_performance_profile(self, profile: TextFxPerformanceProfile) -> Self
pub fn perf(self, profile: TextFxPerformanceProfile) -> Self
pub fn with_gpu_budget(self, budget: TextFxGpuBudget) -> Self
pub fn gpu(self, budget: TextFxGpuBudget) -> Self
pub fn with_render_preference(self, preference: TextFxRenderPreference) -> Self
pub fn render(self, preference: TextFxRenderPreference) -> Self
pub fn with_layout_reserve(self, reserve: TextFxLayoutReserve) -> Self
pub fn reserve(self, reserve: TextFxLayoutReserve) -> Self
pub fn css_first(self) -> Self
pub fn balanced(self) -> Self
pub fn visual_exact(self) -> Self
pub fn gpu_auto(self) -> Self
pub fn gpu_low_power(self) -> Self
pub fn gpu_normal(self) -> Self
pub fn gpu_exact(self) -> Self
pub fn workertown_render(self) -> Self
pub fn layout_reserve_off(self) -> Self
pub fn layout_reserve_auto(self) -> Self
pub fn layout_reserve_exact(self) -> Self
pub fn with_trigger(self, trigger: TextFxTrigger) -> Self
pub fn trigger(self, trigger: TextFxTrigger) -> Self
pub fn on_hover(self) -> Self
pub fn on_click(self) -> Self
pub fn split_words(self) -> Self
pub fn split_chars(self) -> Self
pub fn loop_count(self, count: u16) -> Self
pub fn loop_infinite(self) -> Self
pub fn reverse(self) -> Self
pub fn alternate(self) -> Self
pub fn yoyo(self) -> Self
pub fn target(self, target: TokenTarget, action: TokenAction) -> Self
pub fn add_target(&mut self, target: TokenTarget, action: TokenAction)
pub fn with_reduced_motion(self, reduced_motion: ReducedMotion) -> Self
pub fn reduced(self, reduced_motion: ReducedMotion) -> Self
pub fn with_direction(self, direction: TextFxDirection) -> Self
pub fn direction(self, direction: TextFxDirection) -> Self
pub fn with_palette( self, palette: impl IntoIterator<Item = impl Into<String>>, ) -> Self
pub fn palette( self, palette: impl IntoIterator<Item = impl Into<String>>, ) -> Self
pub fn with_numbers(self, from: f64, to: f64) -> Self
pub fn nums(self, from: f64, to: f64) -> Self
pub fn with_cursor(self, cursor: bool) -> Self
pub fn cursor(self, cursor: bool) -> Self
pub fn with_charset(self, charset: impl Into<String>) -> Self
pub fn charset(self, charset: impl Into<String>) -> Self
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) -> Self
pub fn route_profile(self, profile: TextFxPresetProfile) -> Self
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§impl<'de> Deserialize<'de> for TextFxConfig
impl<'de> Deserialize<'de> for TextFxConfig
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
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
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