Trait Cob

Source
pub trait Cob: Sized {
    type Action: CobAction + for<'de> Deserialize<'de> + Serialize;
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn from_root<R>(op: Op<Self::Action>, repo: &R) -> Result<Self, Self::Error>
       where R: ReadRepository;
    fn op<'a, R, I>(
        &mut self,
        op: Op<Self::Action>,
        concurrent: I,
        repo: &R,
    ) -> Result<(), Self::Error>
       where R: ReadRepository,
             I: IntoIterator<Item = &'a Entry<Oid, Oid, ExtendedSignature>>;
}
Expand description

A collaborative object. Can be materialized from an operation history.

Required Associated Types§

Source

type Action: CobAction + for<'de> Deserialize<'de> + Serialize

The underlying action composing each operation.

Source

type Error: Error + Send + Sync + 'static

Error returned by apply function.

Required Methods§

Source

fn from_root<R>(op: Op<Self::Action>, repo: &R) -> Result<Self, Self::Error>
where R: ReadRepository,

Initialize a collaborative object from a root operation.

Source

fn op<'a, R, I>( &mut self, op: Op<Self::Action>, concurrent: I, repo: &R, ) -> Result<(), Self::Error>

Apply an operation to the state.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§