[][src]Struct chronofold::Version

pub struct Version<A: Author> { /* fields omitted */ }

A vector clock representing the chronofold's version.

Implementations

impl<A: Author> Version<A>[src]

pub fn new() -> Self[src]

Constructs a new, empty version.

pub fn inc(&mut self, timestamp: &Timestamp<A>)[src]

Increments the version using a timestamp.

pub fn iter<'a>(&'a self) -> impl Iterator<Item = Timestamp<A>> + 'a[src]

Returns an iterator over the timestamps in this version.

impl<A: Author> Version<A>[src]

pub fn get(&self, author: &A) -> Option<LogIndex>[src]

Returns the version's log index for author.

Trait Implementations

impl<A: Clone + Author> Clone for Version<A>[src]

impl<A: Debug + Author> Debug for Version<A>[src]

impl<A: Author> Default for Version<A>[src]

impl<A: Eq + Author> Eq for Version<A>[src]

impl<A: PartialEq + Author> PartialEq<Version<A>> for Version<A>[src]

impl<A: Author> PartialOrd<Version<A>> for Version<A>[src]

impl<A: Author> StructuralEq for Version<A>[src]

impl<A: Author> StructuralPartialEq for Version<A>[src]

Auto Trait Implementations

impl<A> RefUnwindSafe for Version<A> where
    A: RefUnwindSafe

impl<A> Send for Version<A> where
    A: Send

impl<A> Sync for Version<A> where
    A: Sync

impl<A> Unpin for Version<A> where
    A: Unpin

impl<A> UnwindSafe for Version<A> where
    A: RefUnwindSafe + UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.