Timeline
struct · ferroui-designer-animation · v0.5.0
struct Timeline
Members
durationdelaydelay_between_iterationsplayback_behaviorspeed_ratiorepeatplayback_directionfilleasingtracksnewvalidaterecordtracktrack_mutremove_trackcompilesamplescrubpauses_when_hiddentotal_durationto_xamlto_style_xamlfrom_xamlimport_xaml
duration
duration: f64
delay
delay: f64
delay_between_iterations
delay_between_iterations: f64
playback_behavior
playback_behavior: PlaybackBehavior
speed_ratio
speed_ratio: f64
repeat
repeat: Repeat
playback_direction
playback_direction: PlaybackDirection
fill
fill: FillMode
easing
easing: crate::Easing
Global progress easing, applied before selecting an incoming keyframe segment.
tracks
tracks: Vec<Track>
new
fn new(duration: f64) -> Result<Self>
validate
fn validate(self: &Self) -> Result<()>
record
fn record(self: &mut Self, target: u64, property: impl Into<String>, time: f64, value: AnimationValue) -> Result<()>
track
fn track(self: &Self, target: u64, property: &str) -> Option<&Track>
track_mut
fn track_mut(self: &mut Self, target: u64, property: &str) -> Option<&mut Track>
remove_track
fn remove_track(self: &mut Self, target: u64, property: &str) -> bool
compile
fn compile(self: &Self) -> Result<CompiledTimeline>
Compiles once after authoring, then samples in O(tracks * log(keyframes)) per frame.
sample
fn sample(self: &Self, time: f64) -> Result<Vec<Sample>>
scrub
fn scrub(self: &Self, time: f64) -> Result<Vec<Sample>>
Samples a single iteration directly for timeline scrubbing, ignoring delay/repeat/direction.
pauses_when_hidden
fn pauses_when_hidden(self: &Self, manually_started: bool) -> bool
Whether the running clock pauses for an effectively invisible target.
total_duration
fn total_duration(self: &Self) -> Option<f64>
to_xaml
fn to_xaml(self: &Self, target: u64) -> Result<String>
Export one target as native FerroUI Animation markup. Authored tracks without an underlying value receive explicit hold endpoints. Imported tracks with a captured underlying value keep native implicit endpoints: the host must retain that base property on the target. Materializing those endpoints would alter reverse initial-delay fill. XML is encoded once, preserving markup-extension text as an attribute value.
to_style_xaml
fn to_style_xaml(self: &Self, target: u64, selector: &str) -> Result<String>
Place this inside the owning control's .Styles property with an explicit named selector.
from_xaml
fn from_xaml(source: &str, target: u64) -> Result<Self>
import_xaml
fn import_xaml(source: &str, target: u64, options: &ImportOptions) -> Result<AnimationImport>
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedDeserializeOwnedCloneDebugStructuralPartialEqPartialEqSerializeDeserialize<'de>
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.