Struct crdt_rs::PSet [] [src]

pub struct PSet<T> { /* fields omitted */ }

Implements a state based two-phase set using two GSets

Methods

impl<T: Ord + Clone> PSet<T>
[src]

Creates a new PSet

Inserts an element of type T into the given PSet. Returns true if the element was already in the set. Otherwise, it inserts the element and returns false

Removes the given element from the PSet

Checks if the given value of type T is in the set. If the check is successful, returns true. Otherwise returns false

Returns the contents of the given set. This is equivalent to the set difference between the add set and the remove set

Checks if the given PSet is empty

Returns the length of the given PSet

Returns the set union between the given PSet and another PSet as a PSet

Returns the set intersection between the given PSet and another PSet as a PSet

Returns the set difference between the given PSet and another PSet as a PSet

Trait Implementations

impl<T: Clone> Clone for PSet<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Hash> Hash for PSet<T>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<T: Debug> Debug for PSet<T>
[src]

Formats the value using the given formatter.

impl<T: Ord + Clone> FromIterator<T> for PSet<T>
[src]

Creates a value from an iterator. Read more

impl<T: Ord + Clone> Extend<T> for PSet<T>
[src]

Extends a collection with the contents of an iterator. Read more