pub trait FromLeapSecondDateTime: Sized {
type Error: Error;
// Required method
fn from_datetime(
date: Date,
hour: u8,
minute: u8,
second: u8,
leap_second_provider: &impl LeapSecondProvider,
) -> Result<Self, Self::Error>;
}Expand description
This trait is the leap second equivalent of FromDateTime. It permits the creation of time
points from date-times when a non-standard leap second provider must be used.
Required Associated Types§
Required Methods§
Sourcefn from_datetime(
date: Date,
hour: u8,
minute: u8,
second: u8,
leap_second_provider: &impl LeapSecondProvider,
) -> Result<Self, Self::Error>
fn from_datetime( date: Date, hour: u8, minute: u8, second: u8, leap_second_provider: &impl LeapSecondProvider, ) -> Result<Self, Self::Error>
Maps a given combination of date and time-of-day to an instant on this time scale. May return an error if the input does not represent a valid combination of date and time-of-day.
Takes a leap second provider as additional argument, which is used to determine at which times leap seconds are inserted or deleted.
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.