[][src]Struct crdts::orswot::Orswot

pub struct Orswot<M: Member, A: Actor> { /* fields omitted */ }

Orswot is an add-biased or-set without tombstones ported from the riak_dt CRDT library.

Methods

impl<M: Member, A: Actor> Orswot<M, A>[src]

pub fn new() -> Self[src]

Returns a new Orswot instance.

pub fn add(&self, member: M, ctx: AddCtx<A>) -> Op<M, A>[src]

Add a single element.

pub fn rm(&self, member: M, ctx: RmCtx<A>) -> Op<M, A>[src]

Remove a member with a witnessing ctx.

pub fn contains(&self, member: &M) -> ReadCtx<bool, A>[src]

Check if the set contains a member

pub fn read(&self) -> ReadCtx<HashSet<M>, A>[src]

Retrieve the current members.

Trait Implementations

impl<M: Member, A: Actor> CvRDT for Orswot<M, A>[src]

fn merge(&mut self, other: Self)[src]

Merge combines another Orswot with this one.

impl<M: Member, A: Actor> CmRDT for Orswot<M, A>[src]

type Op = Op<M, A>

Op defines a mutation to the CRDT. As long as Op's from one actor are replayed in exactly the same order they were generated by that actor, the CRDT will converge. In other words, we must have a total ordering on each actors operations, while requiring only a partial order over all ops. E.g. Read more

impl<M: Member, A: Actor> Causal<A> for Orswot<M, A>[src]

impl<M: PartialEq + Member, A: PartialEq + Actor> PartialEq<Orswot<M, A>> for Orswot<M, A>[src]

impl<M: Eq + Member, A: Eq + Actor> Eq for Orswot<M, A>[src]

impl<M: Member, A: Actor> Default for Orswot<M, A>[src]

impl<M: Clone + Member, A: Clone + Actor> Clone for Orswot<M, A>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<M: Debug + Member, A: Debug + Actor> Debug for Orswot<M, A>[src]

impl<M: Member, A: Actor> Serialize for Orswot<M, A> where
    M: Serialize,
    A: Serialize
[src]

impl<'de, M: Member, A: Actor> Deserialize<'de> for Orswot<M, A> where
    M: Deserialize<'de>,
    A: Deserialize<'de>, 
[src]

Auto Trait Implementations

impl<M, A> Send for Orswot<M, A> where
    A: Send,
    M: Send

impl<M, A> Unpin for Orswot<M, A> where
    A: Unpin,
    M: Unpin

impl<M, A> Sync for Orswot<M, A> where
    A: Sync,
    M: Sync

impl<M, A> UnwindSafe for Orswot<M, A> where
    A: RefUnwindSafe + UnwindSafe,
    M: RefUnwindSafe

impl<M, A> RefUnwindSafe for Orswot<M, A> where
    A: RefUnwindSafe,
    M: RefUnwindSafe

Blanket Implementations

impl<T> Val for T where
    T: PartialEq<T> + Clone + Debug
[src]

impl<T> Val for T where
    T: Clone + Debug
[src]

impl<A, T> Val<A> for T where
    A: Actor,
    T: Debug + Default + Clone + Causal<A> + CmRDT + CvRDT
[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]