[][src]Trait oatie::ot::OT

pub trait OT where
    Self: Sized
{ type Doc; fn apply(doc: &Self::Doc, op: &Self) -> Self::Doc;
fn empty() -> Self;
fn compose(a: &Self, b: &Self) -> Self;
fn compose_iter<'a, I>(iter: I) -> Self
    where
        I: Iterator<Item = &'a Self>,
        Self: 'a
;
fn transform(a: &Self, b: &Self) -> (Self, Self);
fn transform_advance(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 Op::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

impl<S: Schema> OT for Op<S>
[src]