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

pub struct Orswot<Member: Ord + Clone + Encodable + Decodable, Actor: Ord + Clone + Encodable + Decodable> { /* fields omitted */ }

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

Methods

impl<Member: Ord + Clone + Encodable + Decodable, Actor: Ord + Clone + Encodable + Decodable> Orswot<Member, Actor>
[src]

Returns a new Orswot instance.

Add a single element.

Safety

add should never be passed identical actor arguments for different replicas. This will result in data loss:

use crdts::Orswot;
let (mut a, mut b) = (Orswot::new(), Orswot::new());
a.add(1, 1);
b.add(2, 1);
a.merge(b);
assert!(a.value().is_empty());

Add several members.

Remove a member without providing a witnessing context. Returns an existing context VClock if it was present.

Remove a member using a witnessing context.

Remove multiple members, without providing a witnessing context.

Remove multiple members with a witnessing context.

Retrieve the current members.

Merge combines another Orswot with this one.

Returns the current VClock associated with this Orswot.

Trait Implementations

impl<Member: Debug + Ord + Clone + Encodable + Decodable, Actor: Debug + Ord + Clone + Encodable + Decodable> Debug for Orswot<Member, Actor>
[src]

Formats the value using the given formatter.

impl<Member: Clone + Ord + Clone + Encodable + Decodable, Actor: Clone + Ord + Clone + Encodable + Decodable> Clone for Orswot<Member, Actor>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<Member: PartialEq + Ord + Clone + Encodable + Decodable, Actor: PartialEq + Ord + Clone + Encodable + Decodable> PartialEq for Orswot<Member, Actor>
[src]

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

This method tests for !=.

impl<Member: Eq + Ord + Clone + Encodable + Decodable, Actor: Eq + Ord + Clone + Encodable + Decodable> Eq for Orswot<Member, Actor>
[src]

impl<Member: Hash + Ord + Clone + Encodable + Decodable, Actor: Hash + Ord + Clone + Encodable + Decodable> Hash for Orswot<Member, Actor>
[src]

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

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

impl<Member: Encodable + Ord + Clone + Encodable + Decodable, Actor: Encodable + Ord + Clone + Encodable + Decodable> Encodable for Orswot<Member, Actor>
[src]

Serialize a value using an Encoder.

impl<Member: Decodable + Ord + Clone + Encodable + Decodable, Actor: Decodable + Ord + Clone + Encodable + Decodable> Decodable for Orswot<Member, Actor>
[src]

Deserialize a value using a Decoder.