pub struct LogosMoment(pub i64);Expand description
Moment stored as nanoseconds since Unix epoch.
Provides nanosecond precision for timestamps.
Tuple Fields§
§0: i64Implementations§
Source§impl LogosMoment
impl LogosMoment
Sourcepub fn parse_rfc3339(s: &str) -> Self
pub fn parse_rfc3339(s: &str) -> Self
Parse an RFC 3339 / ISO 8601 timestamp into a moment — the AOT mirror of the interpreter’s
parse_timestamp. Panics on malformed input (the front-end has validated it before codegen).
Sourcepub fn format_rfc3339(&self) -> String
pub fn format_rfc3339(&self) -> String
Render this moment as an RFC 3339 / ISO 8601 UTC string — the AOT mirror of format_timestamp.
Sourcepub fn year(&self) -> i64
pub fn year(&self) -> i64
UTC calendar components — the AOT mirrors of year_of/month_of/day_of/weekday_of.
pub fn month(&self) -> i64
pub fn day(&self) -> i64
pub fn weekday(&self) -> i64
pub fn hour(&self) -> i64
pub fn minute(&self) -> i64
pub fn second(&self) -> i64
Sourcepub fn date(&self) -> LogosDate
pub fn date(&self) -> LogosDate
The calendar day this moment falls on (UTC) — the AOT mirror of date_of.
Sourcepub fn time_of_day(&self) -> LogosTime
pub fn time_of_day(&self) -> LogosTime
The wall-clock time-of-day (UTC) — the AOT mirror of time_of.
Sourcepub fn add_seconds(&self, seconds: i64) -> Self
pub fn add_seconds(&self, seconds: i64) -> Self
The moment seconds later (AOT mirror of add_seconds).
Sourcepub fn seconds_until(&self, other: &LogosMoment) -> i64
pub fn seconds_until(&self, other: &LogosMoment) -> i64
Whole seconds from self to other (AOT mirror of seconds_between).
Sourcepub fn months_until(&self, other: &LogosMoment) -> i64
pub fn months_until(&self, other: &LogosMoment) -> i64
Complete calendar months / years from self to other — AOT mirrors of
months_between / years_between (signed, end-of-month-clamping correct).
pub fn years_until(&self, other: &LogosMoment) -> i64
Sourcepub fn in_zone(&self, zone_name: &str) -> String
pub fn in_zone(&self, zone_name: &str) -> String
The local wall-clock time (with offset) in a named zone — AOT mirror of in_zone. Panics on
an unknown zone, which the front-end has validated (it errors cleanly in the interpreter).
Sourcepub fn local_instant(&self, zone_name: &str) -> LogosMoment
pub fn local_instant(&self, zone_name: &str) -> LogosMoment
The local-as-UTC instant in a named zone — AOT mirror of local_instant. Composing a UTC
component accessor onto the result reads the zone’s LOCAL field (the hour of m in "<zone>").
Trait Implementations§
Source§impl Add<Duration> for LogosMoment
impl Add<Duration> for LogosMoment
Source§type Output = LogosMoment
type Output = LogosMoment
+ operator.Source§impl Add<LogosSpan> for LogosMoment
impl Add<LogosSpan> for LogosMoment
Source§type Output = LogosMoment
type Output = LogosMoment
+ operator.Source§impl Clone for LogosMoment
impl Clone for LogosMoment
Source§fn clone(&self) -> LogosMoment
fn clone(&self) -> LogosMoment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LogosMoment
impl Debug for LogosMoment
Source§impl Display for LogosMoment
impl Display for LogosMoment
Source§impl Hash for LogosMoment
impl Hash for LogosMoment
Source§impl Ord for LogosMoment
impl Ord for LogosMoment
Source§fn cmp(&self, other: &LogosMoment) -> Ordering
fn cmp(&self, other: &LogosMoment) -> Ordering
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 for LogosMoment
impl PartialEq for LogosMoment
Source§fn eq(&self, other: &LogosMoment) -> bool
fn eq(&self, other: &LogosMoment) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for LogosMoment
impl PartialOrd for LogosMoment
Source§impl Showable for LogosMoment
impl Showable for LogosMoment
fn format_show(&self, f: &mut Formatter<'_>) -> Result
Source§impl Sub<Duration> for LogosMoment
impl Sub<Duration> for LogosMoment
Source§type Output = LogosMoment
type Output = LogosMoment
- operator.Source§impl Sub<LogosSpan> for LogosMoment
impl Sub<LogosSpan> for LogosMoment
Source§type Output = LogosMoment
type Output = LogosMoment
- operator.impl Copy for LogosMoment
impl Eq for LogosMoment
impl StructuralPartialEq for LogosMoment
Auto Trait Implementations§
impl Freeze for LogosMoment
impl RefUnwindSafe for LogosMoment
impl Send for LogosMoment
impl Sync for LogosMoment
impl Unpin for LogosMoment
impl UnsafeUnpin for LogosMoment
impl UnwindSafe for LogosMoment
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.