Struct orset::ORSet [] [src]

pub struct ORSet<T: Eq + Hash> {
    pub name: String,
    // some fields omitted
}

A state based Observe-Remove Set with delta mutation

Fields

Methods

impl<T: Eq + Hash + Clone> ORSet<T>
[src]

Create a new instance of an ORSet

Return any observed dots for a given element or None if the element has not been seen

Add an element to an ORSet

This method creates a new dot for the element and puts it in the add set. It returns the delta mutator representing the add.

Remove an element from an ORSet by passing in the element and it's observed dots

This method returns a delta mutator representing the remove operation.

Invariant: seen can never be empty

Merge another ORSet into this ORSet

Returns true if the state was mutated, false otherwise

Merge a delta into an ORSet

Returns true if the state was mutated, false otherwise

Check if an ORSet contains an element

Return the elements in an ORSet

Trait Implementations

impl<T: Debug + Eq + Hash> Debug for ORSet<T>
[src]

Formats the value using the given formatter.

impl<T: Clone + Eq + Hash> Clone for ORSet<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Eq + Eq + Hash> Eq for ORSet<T>
[src]

impl<T: PartialEq + Eq + Hash> PartialEq for ORSet<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.