Skip to main content

SessionEffects

Trait SessionEffects 

Source
pub trait SessionEffects {
    // Required methods
    fn start_build(&mut self, generation: BuildGeneration);
    fn discard_stale(&mut self, generation: BuildGeneration);
    fn push_candidate(
        &mut self,
        generation: BuildGeneration,
    ) -> Result<(), String>;
    fn report_build_failure(
        &mut self,
        generation: BuildGeneration,
        error: &BuildError,
    );
    fn resubscribe(&mut self) -> Result<(), String>;
}
Expand description

The effects the loop commands; the real implementation snapshots, builds, and pushes over S1 — tests record and script. Every method is commanded by exactly one Directive (or the halt paths).

Required Methods§

Source

fn start_build(&mut self, generation: BuildGeneration)

Launch one build of the CURRENT content at this generation; its completion arrives as LoopInput::BuildCompleted.

Source

fn discard_stale(&mut self, generation: BuildGeneration)

A completed build was superseded before activation; drop its candidate.

Source

fn push_candidate(&mut self, generation: BuildGeneration) -> Result<(), String>

Push the completed candidate through S1 and report the outcome.

§Errors

The node connection is gone (the S3 fate), rendered.

Source

fn report_build_failure( &mut self, generation: BuildGeneration, error: &BuildError, )

A build failed: report RELOAD FAILED — RUNNING LAST GOOD with the verbatim diagnostics.

Source

fn resubscribe(&mut self) -> Result<(), String>

The watcher lost sync: re-establish the subscription after the forced snapshot rebuild the coalescer already scheduled.

§Errors

Re-subscription failed: watching halts loudly, node on last good.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§