Skip to main content

Timestamp

Trait Timestamp 

Source
pub trait Timestamp:
    PartialOrd
    + Ord
    + Clone
    + Debug
    + 'static {
    const MAX: Self;
    const MIN: Self;

    // Required method
    fn merge(&self, other: &Self) -> Self;
}
Expand description

Trait implemented by all types usable as timestamps in JetStream

Required Associated Constants§

Source

const MAX: Self

Maximum or final value of this type. This is the last possible timestamp.

Source

const MIN: Self

Minumum value of this type.

Required Methods§

Source

fn merge(&self, other: &Self) -> Self

Merges two timestamps. Merging is used to align timestamps coming from multiple source e.g. in keyed streams. Merging should yield the lowest common timestamp of the two values. For most types this will be equivalent to the minimum of the two values.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Timestamp for i8

Source§

const MAX: i8 = i8::MAX

Source§

const MIN: i8 = i8::MIN

Source§

fn merge(&self, other: &i8) -> i8

Source§

impl Timestamp for i16

Source§

const MAX: i16 = i16::MAX

Source§

const MIN: i16 = i16::MIN

Source§

fn merge(&self, other: &i16) -> i16

Source§

impl Timestamp for i32

Source§

const MAX: i32 = i32::MAX

Source§

const MIN: i32 = i32::MIN

Source§

fn merge(&self, other: &i32) -> i32

Source§

impl Timestamp for i64

Source§

const MAX: i64 = i64::MAX

Source§

const MIN: i64 = i64::MIN

Source§

fn merge(&self, other: &i64) -> i64

Source§

impl Timestamp for i128

Source§

const MAX: i128 = i128::MAX

Source§

const MIN: i128 = i128::MIN

Source§

fn merge(&self, other: &i128) -> i128

Source§

impl Timestamp for isize

Source§

const MAX: isize = isize::MAX

Source§

const MIN: isize = isize::MIN

Source§

fn merge(&self, other: &isize) -> isize

Source§

impl Timestamp for u8

Source§

const MAX: u8 = u8::MAX

Source§

const MIN: u8 = u8::MIN

Source§

fn merge(&self, other: &u8) -> u8

Source§

impl Timestamp for u16

Source§

const MAX: u16 = u16::MAX

Source§

const MIN: u16 = u16::MIN

Source§

fn merge(&self, other: &u16) -> u16

Source§

impl Timestamp for u32

Source§

const MAX: u32 = u32::MAX

Source§

const MIN: u32 = u32::MIN

Source§

fn merge(&self, other: &u32) -> u32

Source§

impl Timestamp for u64

Source§

const MAX: u64 = u64::MAX

Source§

const MIN: u64 = u64::MIN

Source§

fn merge(&self, other: &u64) -> u64

Source§

impl Timestamp for u128

Source§

const MAX: u128 = u128::MAX

Source§

const MIN: u128 = u128::MIN

Source§

fn merge(&self, other: &u128) -> u128

Source§

impl Timestamp for usize

Source§

const MAX: usize = usize::MAX

Source§

const MIN: usize = usize::MIN

Source§

fn merge(&self, other: &usize) -> usize

Implementors§