pub trait Clock: Sync {
// Required methods
fn sleep(&self, duration: Duration) -> impl Future<Output = ()> + Send;
fn now_unix(&self) -> i64;
}Expand description
The time and delay port.
Sync so a &SunoClient<impl Clock> held across an .await stays Send.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".