Struct optra::TimeStamper [] [src]

pub struct TimeStamper { /* fields omitted */ }

Tracks the relationship between local timestamps and the timestamp on remote machines.

Methods

impl TimeStamper
[src]

Create a new TimeStamper, with no stamps yet assigned

Stamp a remote operation corrsponding to the given site_id and remtoe timestamp with a local timestamp. If this remote id has never been stamped before, then assign it a new timestamp, sequentially after the previous one. If it has, the previously assigned timestamp is returned

Stamp a local operation. This will always create a new timestamp

Gets the local timestamp corresponding to a given remote site_id and remote timestamp

Gets a mapping of timestamps since the given remote site_id and remote timesamp, ordered sequentially, or none if the remote timestamp isn't in the lookup

Gets all of the timestamps that will be needed to lookup the operations in the transaction

Gets the most recent timestamp this stamper has assigned, or None if it has not yet assigned a timestamp. The timestamp contains both the local and remote timestamps

Compresses this TimeStamper to an output source. This can then be expanded again using expand_from

Expands a TimeStamper from an input source that was previous written to by compress_to()

Trait Implementations

impl Debug for TimeStamper
[src]

Formats the value using the given formatter.