Trait brb::brb_data_type::BRBDataType[][src]

pub trait BRBDataType<A>: Debug {
    type Op: Debug + Clone + Hash + Eq + Serialize;
    type ValidationError: Debug + Error + 'static;
    fn new(actor: A) -> Self;
fn validate(
        &self,
        source: &A,
        op: &Self::Op
    ) -> Result<(), Self::ValidationError>;
fn apply(&mut self, op: Self::Op); }

The BRBDataType trait

Associated Types

type Op: Debug + Clone + Hash + Eq + Serialize[src]

The set of ops this data type accepts

type ValidationError: Debug + Error + 'static[src]

A validation error specific to this data type.

Loading content...

Required methods

fn new(actor: A) -> Self[src]

initialize a new replica of this datatype

fn validate(
    &self,
    source: &A,
    op: &Self::Op
) -> Result<(), Self::ValidationError>
[src]

Protection against Byzantines Validate any incoming operations, here you must perform your byzantine fault tolerance checks specific to your algorithm

fn apply(&mut self, op: Self::Op)[src]

Execute an op after it has been validated.

Loading content...

Implementors

Loading content...