Trait tikv_client::TimestampExt[][src]

pub trait TimestampExt: Sized {
    fn version(&self) -> u64;
fn from_version(version: u64) -> Self;
fn try_from_version(version: u64) -> Option<Self>; }

A helper trait to convert a Timestamp to and from an u64.

Currently the only implmentation of this trait is Timestamp in TiKV. It contains a physical part (first 46 bits) and a logical part (last 18 bits).

Required methods

fn version(&self) -> u64[src]

Convert the timestamp to u64.

fn from_version(version: u64) -> Self[src]

Convert u64 to a timestamp.

fn try_from_version(version: u64) -> Option<Self>[src]

Convert u64 to an optional timestamp, where 0 represents no timestamp.

Loading content...


impl TimestampExt for Timestamp[src]

Loading content...