pub trait AsTime:
Debug
+ Copy
+ Ord
+ Eq
+ Send
+ Sync
+ 'static {
// Required methods
fn t(&self) -> i64;
fn range(w: Range<i64>) -> Range<Self>;
fn new(t: i64, s: usize) -> Self;
// Provided methods
fn dt(&self) -> Result<DateTime<Utc>, TimeError> { ... }
fn i(&self) -> usize { ... }
}Required Methods§
fn t(&self) -> i64
fn range(w: Range<i64>) -> Range<Self>
fn new(t: i64, s: usize) -> Self
Provided Methods§
Sourcefn dt(&self) -> Result<DateTime<Utc>, TimeError>
fn dt(&self) -> Result<DateTime<Utc>, TimeError>
Tries to convert the timestamp into a UTC DateTime.
fn i(&self) -> usize
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.