Expand description
A policy-driven state machine for stopping a comedy bit.
The workflow requires one audience observation after each performance. Total performances, repeated material, consecutive rejection, and manual intervention can establish an immutable STOP.
use quaselu_stop::{AudienceReaction, QuaseluStop, StopPolicy};
let mut show = QuaseluStop::new(StopPolicy::new(5, 2, 2)?);
show.start("静かなダジャレ")?;
show.observe(AudienceReaction::Rejected)?;
show.start("静かなダジャレ")?;
let observation = show.observe(AudienceReaction::Rejected)?;
assert!(observation.caused_stop());Structs§
- Cocoshiga
Stop - A cloneable cooperative STOP signal.
- Observation
- Result of observing one performance.
- Performance
- One started performance awaiting an observation.
- Quaselu
Stop - Stateful coordinator for performing, observing, and stopping.
- Stop
Outcome - Result of a valid STOP request.
- Stop
Policy - Boundaries that decide when performance must stop.
- Stop
Record - Immutable provenance for the first accepted STOP request.
Enums§
- Audience
Reaction - Audience response recorded after a performance.
- Policy
Error - Invalid stop-policy configuration.
- Quaselu
Error - Runtime workflow failure.
- Request
Error - Validation failure for a STOP request.
- Stop
Status - Whether a request established STOP or found it already established.