Struct InstantUtc
#[repr(C)]pub struct InstantUtc {
pub timestamp_utc: i64,
}
Expand description
A timestamp denoting an instant on the UTC timeline.
Fields§
§timestamp_utc: i64
timestamp_utc
is the number of nanoseconds since the start of the Unix
epoch, relative to the UTC timezone.
Fuchsia FIDL library zx
does not have a core type that denotes this
(in contrast to say zx.Time
), so we use a custom type to try and make
it harder to provide a timestamp set on the wrong timeline.
§Usage note
Timestamps that reference the UTC timeline are unusual. This is because the UTC timeline is actively adjusted to match the external notion of accurate UTC time, and can change the rate, or can even “jump” both forwards or backwards. Adjusting the notion of the UTC time manually can pull in or push out deadlines tied to this timeline.
This is why it is always recommended to use the UTC timeline only to denote instants on the UTC timeline, and not use it to measure durations.
Trait Implementations§
§impl Clone for InstantUtc
impl Clone for InstantUtc
§fn clone(&self) -> InstantUtc
fn clone(&self) -> InstantUtc
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for InstantUtc
impl Debug for InstantUtc
§impl<D> Decode<InstantUtc, D> for InstantUtcwhere
D: ResourceDialect,
impl<D> Decode<InstantUtc, D> for InstantUtcwhere
D: ResourceDialect,
§fn new_empty() -> InstantUtc
fn new_empty() -> InstantUtc
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<InstantUtc, D> for &InstantUtcwhere
D: ResourceDialect,
impl<D> Encode<InstantUtc, D> for &InstantUtcwhere
D: ResourceDialect,
§impl Hash for InstantUtc
impl Hash for InstantUtc
§impl Ord for InstantUtc
impl Ord for InstantUtc
§impl PartialEq for InstantUtc
impl PartialEq for InstantUtc
§impl PartialOrd for InstantUtc
impl PartialOrd for InstantUtc
§impl TypeMarker for InstantUtc
impl TypeMarker for InstantUtc
§type Owned = InstantUtc
type Owned = InstantUtc
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for InstantUtc
impl ValueTypeMarker for InstantUtc
§type Borrowed<'a> = &'a InstantUtc
type Borrowed<'a> = &'a InstantUtc
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<InstantUtc as TypeMarker>::Owned,
) -> <InstantUtc as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<InstantUtc as TypeMarker>::Owned, ) -> <InstantUtc as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.