pub type IndexValue = TimeInt;
Aliased Type§
struct IndexValue(/* private fields */);
Implementations
Source§impl TimeInt
impl TimeInt
Sourcepub const STATIC: TimeInt = _
pub const STATIC: TimeInt = _
Special value used to represent static data.
It is illegal to create a TimeInt
with that value in a temporal context.
SDK users cannot log data at that timestamp explicitly, the only way to do so is to use the static APIs.
Sourcepub const MIN: TimeInt = _
pub const MIN: TimeInt = _
Value used to represent the minimal temporal value a TimeInt
can hold.
This is not i64::MIN
, as that is a special value reserved as a marker for static
data (see Self::STATIC
).
Sourcepub const MAX: TimeInt = _
pub const MAX: TimeInt = _
Value used to represent the maximum temporal value a TimeInt
can hold.
pub const ZERO: TimeInt = _
pub const ONE: TimeInt = _
pub fn is_static(self) -> bool
Sourcepub fn new_temporal(time: i64) -> TimeInt
pub fn new_temporal(time: i64) -> TimeInt
Creates a new temporal TimeInt
.
If time
is i64::MIN
, this will return TimeInt::MIN
.
This can’t return TimeInt::STATIC
, ever.
Sourcepub fn from_nanos(nanos: NonMinI64) -> TimeInt
pub fn from_nanos(nanos: NonMinI64) -> TimeInt
For time timelines.
Sourcepub fn from_millis(millis: NonMinI64) -> TimeInt
pub fn from_millis(millis: NonMinI64) -> TimeInt
For time timelines.
Sourcepub fn from_sequence(sequence: NonMinI64) -> TimeInt
pub fn from_sequence(sequence: NonMinI64) -> TimeInt
For sequence timelines.
Sourcepub fn saturated_temporal_i64(value: impl Into<i64>) -> TimeInt
pub fn saturated_temporal_i64(value: impl Into<i64>) -> TimeInt
Clamp to valid non-static range.
Sourcepub fn saturated_temporal(value: impl TryInto<TimeInt>) -> TimeInt
pub fn saturated_temporal(value: impl TryInto<TimeInt>) -> TimeInt
Clamp to valid non-static range.
Sourcepub const fn as_i64(self) -> i64
pub const fn as_i64(self) -> i64
Returns i64::MIN
for Self::STATIC
.
Sourcepub const fn as_f64(self) -> f64
pub const fn as_f64(self) -> f64
Returns f64::MIN
for Self::STATIC
.
Sourcepub fn inc(self) -> TimeInt
pub fn inc(self) -> TimeInt
Always returns Self::STATIC
for Self::STATIC
.
Sourcepub fn dec(self) -> TimeInt
pub fn dec(self) -> TimeInt
Always returns Self::STATIC
for Self::STATIC
.
Trait Implementations
Source§impl<'de> Deserialize<'de> for TimeInt
impl<'de> Deserialize<'de> for TimeInt
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TimeInt, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TimeInt, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Ord for TimeInt
impl Ord for TimeInt
Source§impl PartialOrd<TimeReal> for TimeInt
impl PartialOrd<TimeReal> for TimeInt
Source§impl PartialOrd for TimeInt
impl PartialOrd for TimeInt
Source§impl Serialize for TimeInt
impl Serialize for TimeInt
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl SizeBytes for TimeInt
impl SizeBytes for TimeInt
Source§fn heap_size_bytes(&self) -> u64
fn heap_size_bytes(&self) -> u64
self
uses on the heap. Read moreSource§fn total_size_bytes(&self) -> u64
fn total_size_bytes(&self) -> u64
self
in bytes, accounting for both stack and heap space.Source§fn stack_size_bytes(&self) -> u64
fn stack_size_bytes(&self) -> u64
self
on the stack, in bytes. Read more