Skip to main content

TurnAccess

Trait TurnAccess 

Source
pub trait TurnAccess: Send + Sync {
    // Required method
    fn issue(&self, session: &TurnSession) -> Result<TurnPass, SupervisorError>;

    // Provided method
    fn asked_to_stop(&self) -> bool { ... }
}
Expand description

Issues the runs of one supervision turn their credentials.

The core hands one of these to crate::SupervisorPort::run_turn for the turn it starts, already bound to the agent class and that turn’s print, and revokes everything it issued when the turn returns.

Required Methods§

Source

fn issue(&self, session: &TurnSession) -> Result<TurnPass, SupervisorError>

The pass the run in session presents.

Issuing again within the same turn — a harness that refused to continue one session moves the turn into the next — revokes the pass issued before, so a turn holds one live credential at a time.

§Errors

Returns SupervisorError::Unavailable when no credential could be minted, which is a run that could reach nothing and is not started.

Provided Methods§

Source

fn asked_to_stop(&self) -> bool

Whether this turn has asked for its print to be paused or cancelled, whether the request was taken or refused: what an answer of Disposition::Stop is held to, since an answer stops nothing by itself. false when nothing says.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§