codemp/src/lib/operation/processor.rs

11 lines
347 B
Rust

use std::ops::Range;
use operational_transform::{OperationSeq, OTError};
use crate::operation::factory::OperationFactory;
#[tonic::async_trait]
pub trait OperationProcessor : OperationFactory {
async fn apply(&self, op: OperationSeq) -> Result<Range<u64>, OTError>;
async fn process(&self, op: OperationSeq) -> Result<Range<u64>, OTError>;
}