Struct fly::GCounter [] [src]

pub struct GCounter<N> {
    pub data: HashMap<N, u64>,
}

Fields

data: HashMap<N, u64>

Methods

impl<N> GCounter<N> where N: Eq + Hash + Clone + Copy
[src]

fn new() -> GCounter<N>

Trait Implementations

impl<N> Counter<N> for GCounter<N> where N: Eq + Hash + Clone + Copy
[src]

fn incr(&mut self, node: N, delta: u64)

fn value(&self) -> u64

fn decr(&mut self, node: N, delta: u64)

impl<N> Crdt for GCounter<N> where N: Eq + Hash + Clone + Copy
[src]

fn merge(&self, other: &GCounter<N>) -> GCounter<N>