gdp_rs 0.0.1

A library for implementing Ghosts-of-departed-proofs pattern in rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::fmt::Debug;

pub mod impl_;
pub mod list;

/// Trait for propositions about a subject of type `Subject`.
pub trait Proposition<Subject>: Send + Sync + Debug + Clone {}

/// A trait for evaluable propositions.
pub trait Evaluable<S>: Proposition<S> {
    type EvalError: Into<Box<dyn std::error::Error + Send + Sync + 'static>> + Send + 'static;

    /// Evaluate the proposition for given subject.
    fn evaluate_for(sub: &S) -> Result<(), Self::EvalError>;
}