Skip to main content

DomainEdit

Trait DomainEdit 

Source
pub trait DomainEdit {
    // Required methods
    fn domain(&self) -> &'static str;
    fn apply(
        &self,
        cx: &mut Cx,
        doc: &mut Doc,
        op: &Value,
    ) -> Result<(), OfficeError>;
    fn invert(&self, op: &Value) -> Value;
}
Expand description

Domain implementation for applying and inverting open edit payloads.

Required Methods§

Source

fn domain(&self) -> &'static str

Stable domain namespace for this edit implementation.

Source

fn apply( &self, cx: &mut Cx, doc: &mut Doc, op: &Value, ) -> Result<(), OfficeError>

Applies a domain operation to a document.

Source

fn invert(&self, op: &Value) -> Value

Produces the domain operation that reverses op.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§