[−][src]Trait oatie::doc::OT
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
type Doc
Required Methods
fn apply(doc: &Self::Doc, op: &Self) -> Self::Doc
Applies an operation to a Self::Doc
, returning the modified Self::Doc
.
fn empty() -> Self
Returns an empty operation.
fn compose(a: &Self, b: &Self) -> Self
Composes two operations, returning a single operation encapsulating them both.
fn compose_iter<'a, I>(iter: I) -> Self where
I: Iterator<Item = &'a Self>,
Self: 'a,
I: Iterator<Item = &'a Self>,
Self: 'a,
Composes an iterator of operations into a single operation. If no operations are returned from the iterator, the Op::empty() should be returned.
fn transform(a: &Self, b: &Self) -> (Self, Self)
Transform a document given the corresponding Schema trait.
fn transform_advance(a: &Self, b: &Self) -> Self
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]
impl<S: Schema> OT for Op<S>
type Doc = Doc<S>
fn apply(doc: &Self::Doc, op: &Self) -> Self::Doc
[src]
fn apply(doc: &Self::Doc, op: &Self) -> Self::Doc
fn empty() -> Self
[src]
fn empty() -> Self
fn compose(a: &Self, b: &Self) -> Self
[src]
fn compose(a: &Self, b: &Self) -> Self
fn compose_iter<'a, I>(iter: I) -> Self where
I: Iterator<Item = &'a Self>,
S: 'a,
[src]
fn compose_iter<'a, I>(iter: I) -> Self where
I: Iterator<Item = &'a Self>,
S: 'a,
fn transform(a: &Self, b: &Self) -> (Self, Self)
[src]
fn transform(a: &Self, b: &Self) -> (Self, Self)
fn transform_advance(a: &Self, b: &Self) -> Self
[src]
fn transform_advance(a: &Self, b: &Self) -> Self