pub trait FromDateTime: Sized {
type Error: Error;
// Required method
fn from_datetime(
date: Date,
hour: u8,
minute: u8,
second: u8,
) -> Result<Self, Self::Error>;
}Expand description
This trait may be implemented for time points that can be constructed based on a date-time pair: they can connect a date and time-of-day to a specific time instant within their internal scale and vice versa.
Required Associated Types§
Required Methods§
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.
Implementors§
Source§impl FromDateTime for UtcTime
impl FromDateTime for UtcTime
type Error = InvalidUtcDateTime
Source§impl<Scale> FromDateTime for TimePoint<Scale>where
Scale: ?Sized + UniformDateTimeScale,
impl<Scale> FromDateTime for TimePoint<Scale>where
Scale: ?Sized + UniformDateTimeScale,
type Error = InvalidTimeOfDay
Source§impl<TimePoint> FromDateTime for TimePointwhere
TimePoint: FromLeapSecondDateTime,
We provide a default implementation that uses the static leap second provider.
impl<TimePoint> FromDateTime for TimePointwhere
TimePoint: FromLeapSecondDateTime,
We provide a default implementation that uses the static leap second provider.