Trait radicle_cob::object::collaboration::Evaluate

source ·
pub trait Evaluate<R>:
    Sized
    + Debug
    + 'static {
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn init(entry: &Entry, store: &R) -> Result<Self, Self::Error>;
    fn apply<'a, I: Iterator<Item = (&'a Oid, &'a Entry)>>(
        &mut self,
        entry: &Entry,
        concurrent: I,
        store: &R,
    ) -> Result<(), Self::Error>;
}
Expand description

An object that can be built by evaluating a history.

Required Associated Types§

source

type Error: Error + Send + Sync + 'static

Required Methods§

source

fn init(entry: &Entry, store: &R) -> Result<Self, Self::Error>

Initialize the object with the first (root) history entry.

source

fn apply<'a, I: Iterator<Item = (&'a Oid, &'a Entry)>>( &mut self, entry: &Entry, concurrent: I, store: &R, ) -> Result<(), Self::Error>

Apply a history entry to the evaluated state.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<R> Evaluate<R> for NonEmpty<Entry>

source§

type Error = Infallible

source§

fn init(entry: &Entry, _store: &R) -> Result<Self, Self::Error>

source§

fn apply<'a, I: Iterator<Item = (&'a Oid, &'a Entry)>>( &mut self, entry: &Entry, _concurrent: I, _store: &R, ) -> Result<(), Self::Error>

Implementors§