Skip to main content

Editor

Trait Editor 

Source
pub trait Editor: Send + Sync {
    // Required methods
    fn decode(&self, cx: &mut Cx, value: &Expr, intent: &Expr) -> Result<Draft>;
    fn commit(&self, cx: &mut Cx, draft: &Draft) -> Result<Operation>;
}
Expand description

An editor decoder: (Value, Intent) -> Draft, then Draft -> operation.

Required Methods§

Source

fn decode(&self, cx: &mut Cx, value: &Expr, intent: &Expr) -> Result<Draft>

Fold an Intent into a pending draft over the value.

Source

fn commit(&self, cx: &mut Cx, draft: &Draft) -> Result<Operation>

Turn a committable draft into a checked operation.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§