[−][src]Struct crdts::orswot::Orswot
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]
&self,
members: I,
ctx: AddCtx<A>
) -> Op<M, A>
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]
&self,
members: I,
ctx: RmCtx<A>
) -> Op<M, A>
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
fn apply(&mut self, op: Self::Op)
[src]
impl<M: Member, A: Actor> CvRDT for Orswot<M, A>
[src]
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]
M: Deserialize<'de>,
A: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
M: Serialize,
A: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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,
A: RefUnwindSafe,
M: RefUnwindSafe,
impl<M, A> Send for Orswot<M, A> where
A: Send,
M: Send,
A: Send,
M: Send,
impl<M, A> Sync for Orswot<M, A> where
A: Sync,
M: Sync,
A: Sync,
M: Sync,
impl<M, A> Unpin for Orswot<M, A> where
A: Unpin,
M: Unpin,
A: Unpin,
M: Unpin,
impl<M, A> UnwindSafe for Orswot<M, A> where
A: RefUnwindSafe + UnwindSafe,
M: UnwindSafe,
A: RefUnwindSafe + UnwindSafe,
M: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<A, T> Val<A> for T where
A: Actor,
T: Clone + Causal<A> + CmRDT + CvRDT,
[src]
A: Actor,
T: Clone + Causal<A> + CmRDT + CvRDT,