Skip to main content

FallibleProcedure

Trait FallibleProcedure 

Source
pub trait FallibleProcedure<P> {
    type Error: Error + 'static + Send + Sync;
    type Output;
    type State;

    const NAME: &'static str;

    // Required methods
    fn initialise_fallible(
        &self,
        _problem: &mut P,
        _state: &mut Self::State,
    ) -> Result<(), Self::Error>;
    fn step_fallible(
        &self,
        problem: &mut P,
        state: &mut Self::State,
        guard: CancellationGuard<'_>,
    ) -> Result<(), Self::Error>;
    fn finalise_fallible(
        &self,
        problem: &mut P,
        state: &Self::State,
    ) -> Result<Self::Output, Self::Error>;
}

Required Associated Constants§

Source

const NAME: &'static str

An identifier for the procedure.

This identifier is printed in tracing logs

Required Associated Types§

Source

type Error: Error + 'static + Send + Sync

Source

type Output

Source

type State

Required Methods§

Source

fn initialise_fallible( &self, _problem: &mut P, _state: &mut Self::State, ) -> Result<(), Self::Error>

Source

fn step_fallible( &self, problem: &mut P, state: &mut Self::State, guard: CancellationGuard<'_>, ) -> Result<(), Self::Error>

Source

fn finalise_fallible( &self, problem: &mut P, state: &Self::State, ) -> Result<Self::Output, Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§