FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Timeline

    struct · ferroui-designer-animation · v0.5.0

    struct Timeline
    

    View source

    Members

    duration

    duration: f64
    

    Source

    delay

    delay: f64
    

    Source

    delay_between_iterations

    delay_between_iterations: f64
    

    Source

    playback_behavior

    playback_behavior: PlaybackBehavior
    

    Source

    speed_ratio

    speed_ratio: f64
    

    Source

    repeat

    repeat: Repeat
    

    Source

    playback_direction

    playback_direction: PlaybackDirection
    

    Source

    fill

    fill: FillMode
    

    Source

    easing

    easing: crate::Easing
    

    Global progress easing, applied before selecting an incoming keyframe segment.

    Source

    tracks

    tracks: Vec<Track>
    

    Source

    new

    fn new(duration: f64) -> Result<Self>
    

    Source

    validate

    fn validate(self: &Self) -> Result<()>
    

    Source

    record

    fn record(self: &mut Self, target: u64, property: impl Into<String>, time: f64, value: AnimationValue) -> Result<()>
    

    Source

    track

    fn track(self: &Self, target: u64, property: &str) -> Option<&Track>
    

    Source

    track_mut

    fn track_mut(self: &mut Self, target: u64, property: &str) -> Option<&mut Track>
    

    Source

    remove_track

    fn remove_track(self: &mut Self, target: u64, property: &str) -> bool
    

    Source

    compile

    fn compile(self: &Self) -> Result<CompiledTimeline>
    

    Compiles once after authoring, then samples in O(tracks * log(keyframes)) per frame.

    Source

    sample

    fn sample(self: &Self, time: f64) -> Result<Vec<Sample>>
    

    Source

    scrub

    fn scrub(self: &Self, time: f64) -> Result<Vec<Sample>>
    

    Samples a single iteration directly for timeline scrubbing, ignoring delay/repeat/direction.

    Source

    pauses_when_hidden

    fn pauses_when_hidden(self: &Self, manually_started: bool) -> bool
    

    Whether the running clock pauses for an effectively invisible target.

    Source

    total_duration

    fn total_duration(self: &Self) -> Option<f64>
    

    Source

    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.

    Source

    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.

    Source

    from_xaml

    fn from_xaml(source: &str, target: u64) -> Result<Self>
    

    Source

    import_xaml

    fn import_xaml(source: &str, target: u64, options: &ImportOptions) -> Result<AnimationImport>
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • DeserializeOwned
    • Clone
    • Debug
    • StructuralPartialEq
    • PartialEq
    • Serialize
    • Deserialize<'de>

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.