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§
Sourcetype Action: CobAction + for<'de> Deserialize<'de> + Serialize
type Action: CobAction + for<'de> Deserialize<'de> + Serialize
The underlying action composing each operation.
Required Methods§
Sourcefn from_root<R>(op: Op<Self::Action>, repo: &R) -> Result<Self, Self::Error>where
R: ReadRepository,
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.
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.