pub struct Timestamp {
padding: Padding,
nanoseconds: ru32<0, 999_999_999>,
seconds: ri64<{ _ }, { _ }>,
}Expand description
A Unix timestamp with nanosecond precision.
This type represents a point in time as a number of seconds and nanoseconds elapsed since the Unix epoch (1970-01-01 00:00:00 UTC). Negative values represent times before the Unix epoch.
Fields§
§padding: Paddingnanoseconds: ru32<0, 999_999_999>seconds: ri64<{ _ }, { _ }>Implementations§
Source§impl Timestamp
impl Timestamp
Sourcepub const UNIX_EPOCH: Self
pub const UNIX_EPOCH: Self
A Timestamp representing the Unix epoch (1970-01-01 00:00:00 UTC).
Sourcepub const MIN: Self
pub const MIN: Self
The minimum valid Timestamp.
The moment in time represented by this value may vary depending on the feature flags enabled.
Sourcepub const MAX: Self
pub const MAX: Self
The maximum valid Timestamp.
The moment in time represented by this value may vary depending on the feature flags enabled.
const fn as_i128(self) -> i128
Source#[doc(hidden)]pub const unsafe fn __new_unchecked(seconds: i64, nanoseconds: u32) -> Self
#[doc(hidden)]pub const unsafe fn __new_unchecked(seconds: i64, nanoseconds: u32) -> Self
Create a Timestamp from the provided seconds and nanoseconds values without checking if
they are valid.
§Safety
Both seconds and nanoseconds must be in range.
Sourcepub(crate) const fn new_ranged(
seconds: ri64<{ _ }, { _ }>,
nanoseconds: ru32<0, 999_999_999>,
) -> Self
pub(crate) const fn new_ranged( seconds: ri64<{ _ }, { _ }>, nanoseconds: ru32<0, 999_999_999>, ) -> Self
Create a Timestamp from the provided seconds and nanoseconds values that are known to be
in range.
Sourcepub const fn from_seconds(seconds: i64) -> Result<Self, ComponentRange>
pub const fn from_seconds(seconds: i64) -> Result<Self, ComponentRange>
Sourcepub const fn from_milliseconds(
milliseconds: i64,
) -> Result<Self, ComponentRange>
pub const fn from_milliseconds( milliseconds: i64, ) -> Result<Self, ComponentRange>
Sourcepub const fn from_microseconds(
microseconds: i128,
) -> Result<Self, ComponentRange>
pub const fn from_microseconds( microseconds: i128, ) -> Result<Self, ComponentRange>
Sourcepub const fn from_nanoseconds(nanoseconds: i128) -> Result<Self, ComponentRange>
pub const fn from_nanoseconds(nanoseconds: i128) -> Result<Self, ComponentRange>
Sourcepub const fn to_offset(self, offset: UtcOffset) -> OffsetDateTime
pub const fn to_offset(self, offset: UtcOffset) -> OffsetDateTime
Convert the Timestamp to an OffsetDateTime at the provided offset.
§Panics
This panics if the resulting date-time with the provided offset is outside the supported
range. Consider using checked_to_offset for a non-panicking
alternative.
Sourcepub const fn checked_to_offset(
self,
offset: UtcOffset,
) -> Option<OffsetDateTime>
pub const fn checked_to_offset( self, offset: UtcOffset, ) -> Option<OffsetDateTime>
Convert the Timestamp to an OffsetDateTime with the provided offset, returning None
if the resulting value is out of range.
Sourcepub const fn to_utc(self) -> UtcDateTime
pub const fn to_utc(self) -> UtcDateTime
Convert the Timestamp to a UtcDateTime.
Sourcepub(crate) const fn as_parts_ranged(
self,
) -> (ri64<{ _ }, { _ }>, ru32<0, 999_999_999>)
pub(crate) const fn as_parts_ranged( self, ) -> (ri64<{ _ }, { _ }>, ru32<0, 999_999_999>)
Get the seconds and nanoseconds of the timestamp as ranged values.
Sourcepub const fn as_seconds(self) -> i64
pub const fn as_seconds(self) -> i64
Sourcepub const fn as_milliseconds(self) -> i64
pub const fn as_milliseconds(self) -> i64
Sourcepub const fn as_microseconds(self) -> i128
pub const fn as_microseconds(self) -> i128
Sourcepub const fn as_nanoseconds(self) -> i128
pub const fn as_nanoseconds(self) -> i128
Sourceconst fn year_leap_ordinal(self) -> (i32, bool, u16)
const fn year_leap_ordinal(self) -> (i32, bool, u16)
Compute the year, leap year status, and ordinal day of the timestamp in UTC.
This algorithm is essentially identical to Date::from_julian_day_unchecked. Instead of
returning Date, it returns the components as a tuple. By not bitpacking the values, it
allows the compiler to see through the function boundary and better optimize methods.
Sourcepub const fn sunday_based_week(self) -> u8
pub const fn sunday_based_week(self) -> u8
Get the Sunday-based week number of the timestamp in UTC.
The returned value will always be in the range 0..=53.
Sourcepub const fn monday_based_week(self) -> u8
pub const fn monday_based_week(self) -> u8
Get the Monday-based week number of the timestamp in UTC.
The returned value will always be in the range 0..=53.
Sourcepub const fn to_calendar_date(self) -> (i32, Month, u8)
pub const fn to_calendar_date(self) -> (i32, Month, u8)
Sourcepub const fn to_ordinal_date(self) -> (i32, u16)
pub const fn to_ordinal_date(self) -> (i32, u16)
Sourcepub const fn to_iso_week_date(self) -> (i32, u8, Weekday)
pub const fn to_iso_week_date(self) -> (i32, u8, Weekday)
Sourcepub const fn to_julian_day(self) -> i32
pub const fn to_julian_day(self) -> i32
Get the Julian day of the timestamp.
Sourcepub const fn millisecond(self) -> u16
pub const fn millisecond(self) -> u16
Sourcepub const fn microsecond(self) -> u32
pub const fn microsecond(self) -> u32
Sourcepub const fn nanosecond(self) -> u32
pub const fn nanosecond(self) -> u32
Sourceconst fn add(self, duration: Duration) -> Result<Self, Overflow>
const fn add(self, duration: Duration) -> Result<Self, Overflow>
Add a Duration to the timestamp. Returns Overflow::Positive or Overflow::Negative if
the result is out of range.
Sourceconst fn sub(self, duration: Duration) -> Result<Self, Overflow>
const fn sub(self, duration: Duration) -> Result<Self, Overflow>
Subtract a Duration from the timestamp. Returns Overflow::Positive or
Overflow::Negative if the result is out of range.
Sourceconst fn add_std(self, duration: StdDuration) -> Result<Self, Overflow>
const fn add_std(self, duration: StdDuration) -> Result<Self, Overflow>
Add a std::time::Duration to the timestamp. Returns Overflow::Positive or
Overflow::Negative if the result is out of range.
Sourceconst fn sub_std(self, duration: StdDuration) -> Result<Self, Overflow>
const fn sub_std(self, duration: StdDuration) -> Result<Self, Overflow>
Subtract a std::time::Duration from the timestamp. Returns Overflow::Positive or
Overflow::Negative if the result is out of range.
Sourcepub const fn checked_add(self, duration: Duration) -> Option<Self>
pub const fn checked_add(self, duration: Duration) -> Option<Self>
Checked addition of a Duration, returning None if the result is out of range.
Sourcepub const fn checked_sub(self, duration: Duration) -> Option<Self>
pub const fn checked_sub(self, duration: Duration) -> Option<Self>
Checked subtraction of a Duration, returning None if the result is out of range.
Sourcepub const fn saturating_add(self, duration: Duration) -> Self
pub const fn saturating_add(self, duration: Duration) -> Self
Saturating addition of a Duration.
Returns Timestamp::MAX or Timestamp::MIN if the result is out of range.
Sourcepub const fn saturating_sub(self, duration: Duration) -> Self
pub const fn saturating_sub(self, duration: Duration) -> Self
Saturating subtraction of a Duration.
Returns Timestamp::MAX or Timestamp::MIN if the result is out of range.
Source§impl Timestamp
Methods that replace part of the Timestamp.
impl Timestamp
Methods that replace part of the Timestamp.
Sourcepub const fn replace_time(self, time: Time) -> Self
pub const fn replace_time(self, time: Time) -> Self
Sourcepub const fn replace_date(self, date: Date) -> Self
pub const fn replace_date(self, date: Date) -> Self
Sourcepub const fn replace_year(self, year: i32) -> Result<Self, ComponentRange>
pub const fn replace_year(self, year: i32) -> Result<Self, ComponentRange>
Replace the year, preserving the month and day. If the date is February 29 and the resulting year is not a leap year, an error is returned.
Sourcepub const fn replace_month(self, month: Month) -> Result<Self, ComponentRange>
pub const fn replace_month(self, month: Month) -> Result<Self, ComponentRange>
Replace the month of the year, preserving the year and day. If the day is invalid for the resulting month, an error is returned.
Sourcepub const fn replace_day(self, day: u8) -> Result<Self, ComponentRange>
pub const fn replace_day(self, day: u8) -> Result<Self, ComponentRange>
Sourcepub const fn replace_ordinal(self, ordinal: u16) -> Result<Self, ComponentRange>
pub const fn replace_ordinal(self, ordinal: u16) -> Result<Self, ComponentRange>
Replace the day of the year.
assert_eq!(
timestamp!(1_546_398_245).replace_ordinal(1),
Ok(timestamp!(1_546_311_845))
);
assert!(timestamp!(1_546_398_245).replace_ordinal(0).is_err()); // 0 isn't a valid day of the year
assert!(timestamp!(1_546_398_245).replace_ordinal(366).is_err()); // the timestamp is in 2019, which isn't a leap yearSourcepub const fn replace_hour(self, hour: u8) -> Result<Self, ComponentRange>
pub const fn replace_hour(self, hour: u8) -> Result<Self, ComponentRange>
Sourcepub const fn replace_minute(self, minute: u8) -> Result<Self, ComponentRange>
pub const fn replace_minute(self, minute: u8) -> Result<Self, ComponentRange>
Sourcepub const fn replace_second(self, second: u8) -> Result<Self, ComponentRange>
pub const fn replace_second(self, second: u8) -> Result<Self, ComponentRange>
Sourcepub const fn replace_millisecond(
self,
millisecond: u16,
) -> Result<Self, ComponentRange>
pub const fn replace_millisecond( self, millisecond: u16, ) -> Result<Self, ComponentRange>
Sourcepub const fn replace_microsecond(
self,
microsecond: u32,
) -> Result<Self, ComponentRange>
pub const fn replace_microsecond( self, microsecond: u32, ) -> Result<Self, ComponentRange>
Sourcepub const fn replace_nanosecond(
self,
nanosecond: u32,
) -> Result<Self, ComponentRange>
pub const fn replace_nanosecond( self, nanosecond: u32, ) -> Result<Self, ComponentRange>
Replace the nanoseconds within the second.
Sourceconst fn replace_nanosecond_ranged(
self,
new_nanos: ru32<0, 999_999_999>,
) -> Self
const fn replace_nanosecond_ranged( self, new_nanos: ru32<0, 999_999_999>, ) -> Self
Replace the nanoseconds within the second using a range-bounded integer to avoid range checks.
Source§impl Timestamp
impl Timestamp
Sourcepub fn format_into(
self,
output: &mut (impl Write + ?Sized),
format: &(impl Formattable + ?Sized),
) -> Result<usize, Format>
Available on crate feature formatting only.
pub fn format_into( self, output: &mut (impl Write + ?Sized), format: &(impl Formattable + ?Sized), ) -> Result<usize, Format>
formatting only.Format the Timestamp using the provided format description.
Sourcepub fn format(
self,
format: &(impl Formattable + ?Sized),
) -> Result<String, Format>
Available on crate feature formatting only.
pub fn format( self, format: &(impl Formattable + ?Sized), ) -> Result<String, Format>
formatting only.Format the Timestamp using the provided format description.
Source§impl Timestamp
impl Timestamp
Source§impl Timestamp
impl Timestamp
Sourceconst DISPLAY_BUFFER_SIZE: usize = 25
const DISPLAY_BUFFER_SIZE: usize = 25
The maximum number of bytes that the fmt_into_buffer method will write, which is also used
by the Display implementation.
Sourcepub(crate) fn fmt_into_buffer(self, buf: &mut [MaybeUninit<u8>; 25]) -> usize
pub(crate) fn fmt_into_buffer(self, buf: &mut [MaybeUninit<u8>; 25]) -> usize
Format the Timestamp into the provided buffer, returning the number of bytes written.
Trait Implementations§
Source§impl AddAssign<Duration> for Timestamp
impl AddAssign<Duration> for Timestamp
Source§fn add_assign(&mut self, rhs: Duration)
fn add_assign(&mut self, rhs: Duration)
§Panics
This may panic if an overflow occurs.
Source§impl AddAssign<Duration> for Timestamp
impl AddAssign<Duration> for Timestamp
Source§fn add_assign(&mut self, rhs: StdDuration)
fn add_assign(&mut self, rhs: StdDuration)
§Panics
This may panic if an overflow occurs.
Source§impl ComponentProvider for Timestamp
Available on crate feature formatting only.
impl ComponentProvider for Timestamp
formatting only.Source§const SUPPLIES_DATE: bool = true
const SUPPLIES_DATE: bool = true
Source§const SUPPLIES_TIME: bool = true
const SUPPLIES_TIME: bool = true
Source§const SUPPLIES_OFFSET: bool = true
const SUPPLIES_OFFSET: bool = true
Source§const SUPPLIES_TIMESTAMP: bool = true
const SUPPLIES_TIMESTAMP: bool = true
Source§type State = TimestampState
type State = TimestampState
Source§fn ordinal(&self, state: &mut Self::State) -> ru16<1, 366>
fn ordinal(&self, state: &mut Self::State) -> ru16<1, 366>
Source§fn iso_week_number(&self, state: &mut Self::State) -> ru8<1, 53>
fn iso_week_number(&self, state: &mut Self::State) -> ru8<1, 53>
Source§fn monday_based_week(&self, state: &mut Self::State) -> ru8<0, 53>
fn monday_based_week(&self, state: &mut Self::State) -> ru8<0, 53>
Source§fn sunday_based_week(&self, state: &mut Self::State) -> ru8<0, 53>
fn sunday_based_week(&self, state: &mut Self::State) -> ru8<0, 53>
Source§fn calendar_year(&self, state: &mut Self::State) -> ri32<-999_999, 999_999>
fn calendar_year(&self, state: &mut Self::State) -> ri32<-999_999, 999_999>
Source§fn iso_year(&self, state: &mut Self::State) -> ri32<-999_999, 999_999>
fn iso_year(&self, state: &mut Self::State) -> ri32<-999_999, 999_999>
Source§fn second(&self, state: &mut Self::State) -> ru8<0, { _ }>
fn second(&self, state: &mut Self::State) -> ru8<0, { _ }>
Source§fn nanosecond(&self, _: &mut Self::State) -> ru32<0, { _ }>
fn nanosecond(&self, _: &mut Self::State) -> ru32<0, { _ }>
Source§fn offset_is_negative(&self, _: &mut Self::State) -> bool
fn offset_is_negative(&self, _: &mut Self::State) -> bool
Source§fn offset_is_utc(&self, _: &mut Self::State) -> bool
fn offset_is_utc(&self, _: &mut Self::State) -> bool
Source§fn offset_hour(&self, _: &mut Self::State) -> ri8<-25, 25>
fn offset_hour(&self, _: &mut Self::State) -> ri8<-25, 25>
Source§fn offset_minute(&self, _: &mut Self::State) -> ri8<{ _ }, { _ }>
fn offset_minute(&self, _: &mut Self::State) -> ri8<{ _ }, { _ }>
Source§fn offset_second(&self, _: &mut Self::State) -> ri8<{ _ }, { _ }>
fn offset_second(&self, _: &mut Self::State) -> ri8<{ _ }, { _ }>
Source§fn unix_timestamp_seconds(&self, _: &mut Self::State) -> i64
fn unix_timestamp_seconds(&self, _: &mut Self::State) -> i64
Source§fn unix_timestamp_milliseconds(&self, _: &mut Self::State) -> i64
fn unix_timestamp_milliseconds(&self, _: &mut Self::State) -> i64
Source§fn unix_timestamp_microseconds(&self, _: &mut Self::State) -> i128
fn unix_timestamp_microseconds(&self, _: &mut Self::State) -> i128
Source§fn unix_timestamp_nanoseconds(&self, _: &mut Self::State) -> i128
fn unix_timestamp_nanoseconds(&self, _: &mut Self::State) -> i128
impl Copy for Timestamp
Source§impl<'a> Deserialize<'a> for Timestamp
Available on crate feature serde only.
impl<'a> Deserialize<'a> for Timestamp
serde only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Source§#[doc(hidden)]fn deserialize_in_place<D>(
deserializer: D,
place: &mut Self,
) -> Result<(), <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
#[doc(hidden)]fn deserialize_in_place<D>(
deserializer: D,
place: &mut Self,
) -> Result<(), <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
self from the given Deserializer. Read moreSource§impl Distribution<Timestamp> for StandardUniform
Available on crate feature rand010 only.
impl Distribution<Timestamp> for StandardUniform
rand010 only.Source§fn sample<R>(&self, rng: &mut R) -> Timestampwhere
R: Rng + ?Sized,
fn sample<R>(&self, rng: &mut R) -> Timestampwhere
R: Rng + ?Sized,
T, using rng as the source of randomness.§fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>where
R: Rng,
Self: Sized,
fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>where
R: Rng,
Self: Sized,
T, using rng as
the source of randomness. Read moreSource§impl Distribution<Timestamp> for Standard
Available on crate feature rand08 only.
impl Distribution<Timestamp> for Standard
rand08 only.Source§impl Distribution<Timestamp> for StandardUniform
Available on crate feature rand09 only.
impl Distribution<Timestamp> for StandardUniform
rand09 only.Source§impl Eq for Timestamp
impl Eq for Timestamp
Source§#[doc(hidden)]fn assert_fields_are_eq(&self)
#[doc(hidden)]fn assert_fields_are_eq(&self)
derive_eq_internals)1.0.0 (const: unstable) · Source§#[doc(hidden)]fn assert_receiver_is_total_eq(&self)
#[doc(hidden)]fn assert_receiver_is_total_eq(&self)
implementation detail of #[derive(Eq)]
Source§impl From<OffsetDateTime> for Timestamp
impl From<OffsetDateTime> for Timestamp
Source§fn from(datetime: OffsetDateTime) -> Self
fn from(datetime: OffsetDateTime) -> Self
§Panics
This may panic if an overflow occurs.
Source§impl From<SystemTime> for Timestamp
Available on crate feature std only.
impl From<SystemTime> for Timestamp
std only.Source§fn from(datetime: SystemTime) -> Self
fn from(datetime: SystemTime) -> Self
§Panics
This may panic if an overflow occurs.
Source§impl From<Timestamp> for OffsetDateTime
impl From<Timestamp> for OffsetDateTime
Source§impl From<Timestamp> for SystemTime
Available on crate feature std only.
impl From<Timestamp> for SystemTime
std only.Source§impl From<Timestamp> for UtcDateTime
impl From<Timestamp> for UtcDateTime
Source§impl From<UtcDateTime> for Timestamp
impl From<UtcDateTime> for Timestamp
Source§fn from(datetime: UtcDateTime) -> Self
fn from(datetime: UtcDateTime) -> Self
Source§impl Ord for Timestamp
impl Ord for Timestamp
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq<OffsetDateTime> for Timestamp
impl PartialEq<OffsetDateTime> for Timestamp
Source§fn eq(&self, other: &OffsetDateTime) -> bool
fn eq(&self, other: &OffsetDateTime) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialEq<SystemTime> for Timestamp
Available on crate feature std only.
impl PartialEq<SystemTime> for Timestamp
std only.Source§fn eq(&self, other: &SystemTime) -> bool
fn eq(&self, other: &SystemTime) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialEq<Timestamp> for OffsetDateTime
impl PartialEq<Timestamp> for OffsetDateTime
Source§impl PartialEq<Timestamp> for SystemTime
Available on crate feature std only.
impl PartialEq<Timestamp> for SystemTime
std only.Source§impl PartialEq<Timestamp> for UtcDateTime
impl PartialEq<Timestamp> for UtcDateTime
Source§impl PartialEq<UtcDateTime> for Timestamp
impl PartialEq<UtcDateTime> for Timestamp
Source§fn eq(&self, other: &UtcDateTime) -> bool
fn eq(&self, other: &UtcDateTime) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for Timestamp
impl PartialOrd for Timestamp
Source§fn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
Source§#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)self == other, returns ControlFlow::Continue(()).
Otherwise, returns ControlFlow::Break(self < other). Read moreSource§#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for <= instead of <.Source§#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for > instead of <.Source§#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for >= instead of <.Source§impl PartialOrd<OffsetDateTime> for Timestamp
impl PartialOrd<OffsetDateTime> for Timestamp
Source§fn partial_cmp(&self, other: &OffsetDateTime) -> Option<Ordering>
fn partial_cmp(&self, other: &OffsetDateTime) -> Option<Ordering>
Source§#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)self == other, returns ControlFlow::Continue(()).
Otherwise, returns ControlFlow::Break(self < other). Read moreSource§#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for <= instead of <.Source§#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for > instead of <.Source§#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for >= instead of <.Source§impl PartialOrd<SystemTime> for Timestamp
Available on crate feature std only.
impl PartialOrd<SystemTime> for Timestamp
std only.Source§fn partial_cmp(&self, other: &SystemTime) -> Option<Ordering>
fn partial_cmp(&self, other: &SystemTime) -> Option<Ordering>
Source§#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)self == other, returns ControlFlow::Continue(()).
Otherwise, returns ControlFlow::Break(self < other). Read moreSource§#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for <= instead of <.Source§#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for > instead of <.Source§#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for >= instead of <.Source§impl PartialOrd<Timestamp> for OffsetDateTime
impl PartialOrd<Timestamp> for OffsetDateTime
Source§#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)self == other, returns ControlFlow::Continue(()).
Otherwise, returns ControlFlow::Break(self < other). Read moreSource§#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for <= instead of <.Source§#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for > instead of <.Source§#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for >= instead of <.Source§impl PartialOrd<Timestamp> for SystemTime
Available on crate feature std only.
impl PartialOrd<Timestamp> for SystemTime
std only.Source§#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)self == other, returns ControlFlow::Continue(()).
Otherwise, returns ControlFlow::Break(self < other). Read moreSource§#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for <= instead of <.Source§#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for > instead of <.Source§#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for >= instead of <.Source§impl PartialOrd<Timestamp> for UtcDateTime
impl PartialOrd<Timestamp> for UtcDateTime
Source§#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)self == other, returns ControlFlow::Continue(()).
Otherwise, returns ControlFlow::Break(self < other). Read moreSource§#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for <= instead of <.Source§#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for > instead of <.Source§#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for >= instead of <.Source§impl PartialOrd<UtcDateTime> for Timestamp
impl PartialOrd<UtcDateTime> for Timestamp
Source§fn partial_cmp(&self, other: &UtcDateTime) -> Option<Ordering>
fn partial_cmp(&self, other: &UtcDateTime) -> Option<Ordering>
Source§#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)self == other, returns ControlFlow::Continue(()).
Otherwise, returns ControlFlow::Break(self < other). Read moreSource§#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for <= instead of <.Source§#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for > instead of <.Source§#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)]fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for >= instead of <.Source§impl Sub<OffsetDateTime> for Timestamp
impl Sub<OffsetDateTime> for Timestamp
Source§impl Sub<SystemTime> for Timestamp
Available on crate feature std only.
impl Sub<SystemTime> for Timestamp
std only.Source§impl Sub<Timestamp> for OffsetDateTime
impl Sub<Timestamp> for OffsetDateTime
Source§impl Sub<Timestamp> for SystemTime
Available on crate feature std only.
impl Sub<Timestamp> for SystemTime
std only.Source§impl Sub<Timestamp> for UtcDateTime
impl Sub<Timestamp> for UtcDateTime
Source§impl Sub<UtcDateTime> for Timestamp
impl Sub<UtcDateTime> for Timestamp
Source§impl SubAssign<Duration> for Timestamp
impl SubAssign<Duration> for Timestamp
Source§fn sub_assign(&mut self, rhs: Duration)
fn sub_assign(&mut self, rhs: Duration)
§Panics
This may panic if an overflow occurs.
Source§impl SubAssign<Duration> for Timestamp
impl SubAssign<Duration> for Timestamp
Source§fn sub_assign(&mut self, rhs: StdDuration)
fn sub_assign(&mut self, rhs: StdDuration)
§Panics
This may panic if an overflow occurs.
impl TrivialClone for Timestamp
Auto Trait Implementations§
impl Freeze for Timestamp
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnsafeUnpin for Timestamp
impl UnwindSafe for Timestamp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> Printable for T
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool = _
#[doc(hidden)]const IS_ZST: bool = _
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout = _
#[doc(hidden)]const LAYOUT: Layout = _
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize = _
#[doc(hidden)]const MAX_SLICE_LEN: usize = _
sized_type_properties)[Self]. Read more