pub trait SessionLaws<This>where
This: UndertakingAlg + RunReadAlg + RunHoldAlg + AttentionAlg + ClockAlg + SessionLawFixture,
This::Id: Clone + Eq + Debug,{
// Required methods
fn session_laws(&mut self) -> Result<()>;
fn check_beginning_laws(&mut self) -> Result<()>;
fn check_saying_laws(&mut self) -> Result<()>;
fn check_unwanted_laws(&mut self) -> Result<()>;
fn check_holding_laws(&mut self) -> Result<()>;
}Expand description
Authors the attendance laws.
Required Methods§
Sourcefn session_laws(&mut self) -> Result<()>
fn session_laws(&mut self) -> Result<()>
Checks that one pass reconciles what is wanted with what is happening.
The laws checked are:
- one pass begins every request wanting work, and no other;
- a request whose work has begun is not begun again, however many passes run;
- everything a run said is told before how it ended, and nothing is told after;
- work refusing to begin ends once and is not begun again;
- a run nobody wants is told to end on every pass until it is over, and ends once;
- time a run is held still is not counted as time it was running;
- attending to no runs tells nothing.
§Errors
Returns the first violated law.
Sourcefn check_beginning_laws(&mut self) -> Result<()>
fn check_beginning_laws(&mut self) -> Result<()>
Checks what one pass begins, and what it declines to begin twice.
§Errors
Returns the first violated law.
Sourcefn check_saying_laws(&mut self) -> Result<()>
fn check_saying_laws(&mut self) -> Result<()>
Checks that what a run said reaches the request before how it ended.
§Errors
Returns the first violated law.
Sourcefn check_unwanted_laws(&mut self) -> Result<()>
fn check_unwanted_laws(&mut self) -> Result<()>
Sourcefn check_holding_laws(&mut self) -> Result<()>
fn check_holding_laws(&mut self) -> Result<()>
Checks that time a run is held still is not time it was running.
§Errors
Returns the first violated law.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<This> SessionLaws<This> for Thiswhere
This: UndertakingAlg + RunReadAlg + RunHoldAlg + AttentionAlg + ClockAlg + SessionLawFixture,
This::Id: Clone + Eq + Debug,
Authors the attendance laws.