pub trait PracticeRule: Send + Sync {
// Required methods
fn id(&self) -> &PracticeRuleId;
fn spec(&self) -> PracticeRuleSpec;
fn evaluate(
&self,
plan: &SerialPlan,
reading: SerialReading,
waivers: &DeclaredWaivers,
) -> InvariantLedgerEntry<PracticeRuleId>;
}Expand description
Open rule component used by one serial practice.
Required Methods§
Sourcefn id(&self) -> &PracticeRuleId
fn id(&self) -> &PracticeRuleId
Returns the stable rule identity.
Sourcefn spec(&self) -> PracticeRuleSpec
fn spec(&self) -> PracticeRuleSpec
Returns the inspectable rule specification.
Sourcefn evaluate(
&self,
plan: &SerialPlan,
reading: SerialReading,
waivers: &DeclaredWaivers,
) -> InvariantLedgerEntry<PracticeRuleId>
fn evaluate( &self, plan: &SerialPlan, reading: SerialReading, waivers: &DeclaredWaivers, ) -> InvariantLedgerEntry<PracticeRuleId>
Evaluates this rule over one named reading.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".