Enum crdts::list::Op[][src]

pub enum Op<T, A: Ord> {
    Insert {
        id: Identifier<OrdDot<A>>,
        val: T,
    },
    Delete {
        id: Identifier<OrdDot<A>>,
        dot: Dot<A>,
    },
}

Operations that can be performed on a List

Variants

Insert

Insert an element

Fields of Insert

id: Identifier<OrdDot<A>>

The Identifier to insert at

val: T

Element to insert

Delete

Delete an element

Fields of Delete

id: Identifier<OrdDot<A>>

The Identifier of the insertion we’re removing

dot: Dot<A>

id of site that issued delete

Implementations

impl<T, A: Ord + Clone + Eq> Op<T, A>[src]

pub fn id(&self) -> &Identifier<OrdDot<A>>[src]

Returns the Identifier this operation is concerning.

pub fn dot(&self) -> Dot<A>[src]

Return the Dot originating the operation.

Trait Implementations

impl<T: Clone, A: Clone + Ord> Clone for Op<T, A>[src]

impl<T: Debug, A: Debug + Ord> Debug for Op<T, A>[src]

impl<'de, T, A: Ord> Deserialize<'de> for Op<T, A> where
    T: Deserialize<'de>,
    A: Deserialize<'de>, 
[src]

impl<T: Eq, A: Eq + Ord> Eq for Op<T, A>[src]

impl<T: PartialEq, A: PartialEq + Ord> PartialEq<Op<T, A>> for Op<T, A>[src]

impl<T, A: Ord> Serialize for Op<T, A> where
    T: Serialize,
    A: Serialize
[src]

impl<T, A: Ord> StructuralEq for Op<T, A>[src]

impl<T, A: Ord> StructuralPartialEq for Op<T, A>[src]

Auto Trait Implementations

impl<T, A> RefUnwindSafe for Op<T, A> where
    A: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, A> Send for Op<T, A> where
    A: Send,
    T: Send

impl<T, A> Sync for Op<T, A> where
    A: Sync,
    T: Sync

impl<T, A> Unpin for Op<T, A> where
    A: Unpin,
    T: Unpin

impl<T, A> UnwindSafe for Op<T, A> where
    A: UnwindSafe,
    T: 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>,