pub trait Referee {
// Required methods
fn is_allowed<L>(&self, lattice: &L, bbas: &[&Assignment<L::Item>]) -> bool
where L: Lattice,
L::Item: Eq + Ord + Hash;
unsafe fn unsafe_from_conditions<L>(
&self,
lattice: &L,
bbas: &[&Assignment<L::Item>],
conditions: SafeArray<'_, L::Item>,
) -> Result<Assignment<L::Item>, String>
where L: Lattice,
L::Item: Eq + Ord + Hash;
// Provided method
fn from_conditions<L>(
&self,
lattice: &L,
bbas: &[&Assignment<L::Item>],
conditions: SafeArray<'_, L::Item>,
) -> Result<Assignment<L::Item>, String>
where L: Lattice,
L::Item: Eq + Ord + Hash { ... }
}Expand description
Trait defining Referee functions
Required Methods§
Sourcefn is_allowed<L>(&self, lattice: &L, bbas: &[&Assignment<L::Item>]) -> bool
fn is_allowed<L>(&self, lattice: &L, bbas: &[&Assignment<L::Item>]) -> bool
Test if fusion is allowed
- does not concern lattice coherence, which is tested by
from_conditions - typically concerns the number of entries or the algebraic properties of lattice
lattice: &L: reference latticebbas: &[&Assignment<L::Item>]: sequence of bbas to be fused- Output: a boolean
Sourceunsafe fn unsafe_from_conditions<L>(
&self,
lattice: &L,
bbas: &[&Assignment<L::Item>],
conditions: SafeArray<'_, L::Item>,
) -> Result<Assignment<L::Item>, String>
unsafe fn unsafe_from_conditions<L>( &self, lattice: &L, bbas: &[&Assignment<L::Item>], conditions: SafeArray<'_, L::Item>, ) -> Result<Assignment<L::Item>, String>
unsafe conditional referee decision
lattice: &L: reference latticebbas: &[&Assignment<L::Item>]: sequence of bbas to be fusedconditions: SafeArray<L::Item>: conditionning safe elements array- Output: fused assigment or error
Provided Methods§
Sourcefn from_conditions<L>(
&self,
lattice: &L,
bbas: &[&Assignment<L::Item>],
conditions: SafeArray<'_, L::Item>,
) -> Result<Assignment<L::Item>, String>
fn from_conditions<L>( &self, lattice: &L, bbas: &[&Assignment<L::Item>], conditions: SafeArray<'_, L::Item>, ) -> Result<Assignment<L::Item>, String>
Conditional referee decision
lattice: &L: reference latticebbas: &[&Assignment<L::Item>]: sequence of bbas to be fusedconditions: SafeArray<L::Item>: conditionning safe elements array- Output: fused assigment or error
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.