pub struct Timestamp(pub i64);Expand description
A timestamp with sentinel semantics. The inner i64 is public so it converts directly to and
from the C ABI representation.
Tuple Fields§
§0: i64Implementations§
Source§impl Timestamp
impl Timestamp
pub const fn unset() -> Self
pub const fn unstarted() -> Self
pub const fn pre_stream() -> Self
pub const fn min() -> Self
pub const fn max() -> Self
pub const fn post_stream() -> Self
pub const fn one_over_post_stream() -> Self
pub const fn done() -> Self
Sourcepub fn is_range_value(self) -> bool
pub fn is_range_value(self) -> bool
Whether this falls inside the ordinary data range [Min, Max].
Sourcepub fn is_allowed_in_stream(self) -> bool
pub fn is_allowed_in_stream(self) -> bool
Whether this is allowed as the timestamp of a packet in a stream — which includes
PreStream and PostStream.
Sourcepub fn next_allowed_in_stream(self) -> Self
pub fn next_allowed_in_stream(self) -> Self
The next timestamp after this one that may legally appear in a stream.
Nothing may follow PreStream, so that case returns OneOverPostStream.
pub fn has_next_allowed_in_stream(self) -> bool
pub fn previous_allowed_in_stream(self) -> Self
Trait Implementations§
Source§impl Add<i64> for Timestamp
Addition and subtraction saturate: arithmetic near the sentinel values neither panics on
overflow nor wraps around.
impl Add<i64> for Timestamp
Addition and subtraction saturate: arithmetic near the sentinel values neither panics on overflow nor wraps around.
impl Copy for Timestamp
impl Eq for Timestamp
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,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Timestamp
impl PartialOrd for Timestamp
impl StructuralPartialEq 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
Mutably borrows from an owned value. Read more
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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.