Trait oatie::OT [] [src]

pub trait OT where
    Self: Sized
{ type Doc; fn apply(_: &Self::Doc, _: &Self) -> Self::Doc;
fn empty() -> Self;
fn compose(_: &Self, _: &Self) -> Self;
fn compose_iter<'a, I>(iter: I) -> Self
    where
        I: Iterator<Item = &'a Self>,
        Self: 'a
;
fn transform<S: Schema>(_: &Self, _: &Self) -> (Self, Self);
fn transform_advance<S: Schema>(a: &Self, b: &Self) -> Self; }

A type that can have operational transform applied to it. The OT trait is implemented on an operation object, and its associated type Doc is what the operation should operate on.

Associated Types

Required Methods

Applies an operation to a Self::Doc, returning the modified Self::Doc.

Returns an empty operation.

Composes two operations, returning a single operation encapsulating them both.

Composes an iterator of operations into a single operation. If no operations are returned from the iterator, the OT::empty() should be returned.

Transform a document given the corresponding Schema trait.

Utility function to transform an operation against a competing one, returning the results of composing them both.

Implementors