Skip to main content

Crate printobserver_supervisor_api

Crate printobserver_supervisor_api 

Source
Expand description

printobserver-supervisor-api.

Owns: the port the supervising agent is reached through — the trait for running one supervision turn and for closing a session, the two shapes those methods carry, and that port’s own error type.

May depend on: printobserver-types only. A port that named an implementation would stop being a port.

§Opening a session is not a call of its own

Opening or continuing is SupervisorPort::run_turn’s own doing, and the SessionPhase it answers is what says which happened. A separate open call would let a caller open a session it then never took a turn in.

§Why the methods answer a boxed future

Every method is asynchronous, and the trait is dyn-compatible and shareable across threads, because the supervision core holds all four ports behind Arc<dyn Port>. An async fn in a trait is not dyn-compatible, so each method answers a BoxFuture instead.

Structs§

TurnOutcome
What one supervision turn answered with.
TurnRequest
What one supervision turn is asked to consider.

Enums§

SupervisorError
Why a supervision turn did not produce an assessment.

Traits§

SupervisorPort
The port the supervising agent is reached through.

Type Aliases§

BoxFuture
A future this port’s methods answer with, in the one shape a trait object can carry.