Skip to main content

Crate quaselu_stop

Crate quaselu_stop 

Source
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§

CocoshigaStop
A cloneable cooperative STOP signal.
Observation
Result of observing one performance.
Performance
One started performance awaiting an observation.
QuaseluStop
Stateful coordinator for performing, observing, and stopping.
StopOutcome
Result of a valid STOP request.
StopPolicy
Boundaries that decide when performance must stop.
StopRecord
Immutable provenance for the first accepted STOP request.

Enums§

AudienceReaction
Audience response recorded after a performance.
PolicyError
Invalid stop-policy configuration.
QuaseluError
Runtime workflow failure.
RequestError
Validation failure for a STOP request.
StopStatus
Whether a request established STOP or found it already established.