pub struct SerialPractice {
pub id: PracticeId,
pub rules: Vec<Arc<dyn PracticeRule>>,
}Expand description
Named serial practice composed from open rule components.
Fields§
§id: PracticeIdStable practice identity.
rules: Vec<Arc<dyn PracticeRule>>Open rule components evaluated in order.
Implementations§
Source§impl SerialPractice
impl SerialPractice
Sourcepub fn new(id: PracticeId, rules: Vec<Arc<dyn PracticeRule>>) -> SerialPractice
pub fn new(id: PracticeId, rules: Vec<Arc<dyn PracticeRule>>) -> SerialPractice
Builds one named serial practice from open rule components.
Sourcepub fn rule_specs(&self) -> Vec<PracticeRuleSpec>
pub fn rule_specs(&self) -> Vec<PracticeRuleSpec>
Returns the inspectable built-in and custom rule specifications.
Sourcepub fn evaluate(
&self,
plan: &SerialPlan,
reading: SerialReading,
waivers: &DeclaredWaivers,
) -> SerialPracticeReport
pub fn evaluate( &self, plan: &SerialPlan, reading: SerialReading, waivers: &DeclaredWaivers, ) -> SerialPracticeReport
Evaluates every rule over one named reading.
Trait Implementations§
Source§impl Clone for SerialPractice
impl Clone for SerialPractice
Source§fn clone(&self) -> SerialPractice
fn clone(&self) -> SerialPractice
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SerialPractice
impl !UnwindSafe for SerialPractice
impl Freeze for SerialPractice
impl Send for SerialPractice
impl Sync for SerialPractice
impl Unpin for SerialPractice
impl UnsafeUnpin for SerialPractice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more