pub struct UtcBuilder { /* private fields */ }Expand description
A builder for constructing Utc instances piecewise.
Implementations§
Source§impl UtcBuilder
impl UtcBuilder
Sourcepub fn with_ymd(self, year: i64, month: u8, day: u8) -> Self
pub fn with_ymd(self, year: i64, month: u8, day: u8) -> Self
Sets the year, month and day fields of the Utc instance being built.
Sourcepub fn with_hms(self, hour: u8, minute: u8, seconds: f64) -> Self
pub fn with_hms(self, hour: u8, minute: u8, seconds: f64) -> Self
Sets the hour, minute, second and subsecond fields of the Utc instance being built.
Sourcepub fn build_with_provider(
self,
provider: &impl LeapSecondsProvider,
) -> Result<Utc, UtcError>
pub fn build_with_provider( self, provider: &impl LeapSecondsProvider, ) -> Result<Utc, UtcError>
Constructs the Utc instance with leap second validation provided by the given LeapSecondsProvider.
Trait Implementations§
Source§impl Clone for UtcBuilder
impl Clone for UtcBuilder
Source§fn clone(&self) -> UtcBuilder
fn clone(&self) -> UtcBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UtcBuilder
impl Debug for UtcBuilder
Source§impl Default for UtcBuilder
impl Default for UtcBuilder
Source§fn default() -> Self
fn default() -> Self
Returns a new UtcBuilder at 2000-01-01T00:00:00.000 UTC.
Source§impl PartialEq for UtcBuilder
impl PartialEq for UtcBuilder
impl Eq for UtcBuilder
impl StructuralPartialEq for UtcBuilder
Auto Trait Implementations§
impl Freeze for UtcBuilder
impl RefUnwindSafe for UtcBuilder
impl Send for UtcBuilder
impl Sync for UtcBuilder
impl Unpin for UtcBuilder
impl UnsafeUnpin for UtcBuilder
impl UnwindSafe for UtcBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more