pub trait ToDateTime {
// Required method
fn as_datetime(&self) -> Result<UtcDateTime, Error>;
}Expand description
Trait providing a function to convert the object to a UtcDateTime.
Required Methods§
Sourcefn as_datetime(&self) -> Result<UtcDateTime, Error>
fn as_datetime(&self) -> Result<UtcDateTime, Error>
Converts the object into a UtcDateTime, or throws an Error.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".