[][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.

Implementations

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

pub fn new() -> Self[src]

Returns a new Orswot instance.

pub fn clock(&self) -> VClock<A>[src]

Return a snapshot of the ORSWOT clock

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

Add a single element.

pub fn add_all<I: IntoIterator<Item = M>>(
    &self,
    members: I,
    ctx: AddCtx<A>
) -> Op<M, A>
[src]

Add multiple elements.

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

Remove a member with a witnessing ctx.

pub fn rm_all<I: IntoIterator<Item = M>>(
    &self,
    members: I,
    ctx: RmCtx<A>
) -> Op<M, A>
[src]

Remove members 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.

pub fn read_ctx(&self) -> ReadCtx<(), A>[src]

Retrieve the current read context

Trait Implementations

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

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

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> CvRDT for Orswot<M, A>[src]

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

Merge combines another Orswot with this one.

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

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

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

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

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

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

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

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

Auto Trait Implementations

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

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

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

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

impl<M, A> UnwindSafe for Orswot<M, A> where
    A: RefUnwindSafe + UnwindSafe,
    M: 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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

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