You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mod.rs
    path of file: ./repos/niri/src/animation
    
    the code of the file until where you have to start completion: use std::time::Duration;

use keyframe::functions::EaseOutCubic;
use keyframe::EasingFunction;
use portable_atomic::{AtomicF64, Ordering};

use crate::utils::get_monotonic_time;

mod spring;
pub use spring::{Spring, SpringParams};

pub static ANIMATION_SLOWDOWN: AtomicF64 = AtomicF64::new(1.);

#[derive(Debug)]
pub struct Animation {
    from: f64,
    to: f64,
    duration: Duration,
    start_time: Duration,
    current_time: Duration,
    kind: Kind,
}

#[derive(De
    
    pub fn ease(from: f64, to: f64, duration_ms: u64, curve: Curve) -> Self {
        // FIXME: ideally we shouldn't use current time here because animations started within the
        // same frame cycle should have the same start time to be synchronized.
        let now = get_monotonic_time();

        let duration = Duration::from_millis(duration_ms);
        let kind = Kind::Easing { curve };

        Self {
            from,
            to,
            duration,
            start_time: now,
            current_time: now,
            kind,
        }
    }