## Delegate

# Trait Delegate

Source

    pub trait Delegate: Sized {
        type Cx: Cx;
        type ValidationScope;
        type ProofTreeBuilder;

        const ENABLE_PROVISIONAL_CACHE: bool;
        const FIXPOINT_STEP_LIMIT: usize;
        const DIVIDE_AVAILABLE_DEPTH_ON_OVERFLOW: usize;

        // Required methods
        fn enter_validation_scope(
            cx: Self::Cx,
            input: <Self::Cx as Cx>::Input,
        ) -> Option<Self::ValidationScope>;
        fn inspect_is_noop(inspect: &mut Self::ProofTreeBuilder) -> bool;
        fn initial_provisional_result(
            cx: Self::Cx,
            kind: PathKind,
            input: <Self::Cx as Cx>::Input,
        ) -> <Self::Cx as Cx>::Result;
        fn is_initial_provisional_result(
            result: <Self::Cx as Cx>::Result,
        ) -> Option<PathKind>;
        fn stack_overflow_result(
            cx: Self::Cx,
            input: <Self::Cx as Cx>::Input,
        ) -> <Self::Cx as Cx>::Result;
        fn fixpoint_overflow_result(
            cx: Self::Cx,
            input: <Self::Cx as Cx>::Input,
        ) -> <Self::Cx as Cx>::Result;
        fn is_ambiguous_result(
            result: <Self::Cx as Cx>::Result,
        ) -> Option<<Self::Cx as Cx>::AmbiguityInfo>;
        fn propagate_ambiguity(
            cx: Self::Cx,
            for_input: <Self::Cx as Cx>::Input,
            ambiguity_info: <Self::Cx as Cx>::AmbiguityInfo,
        ) -> <Self::Cx as Cx>::Result;
        fn compute_goal(
            search_graph: &mut SearchGraph<Self>,
            cx: Self::Cx,
            input: <Self::Cx as Cx>::Input,
            inspect: &mut Self::ProofTreeBuilder,
        ) -> <Self::Cx as Cx>::Result;
    }

## Required Associated Constants§

Source

#### const ENABLE_PROVISIONAL_CACHE: bool

Whether to use the provisional cache. Set to `false` by a fuzzer when validating the search graph.

Source

#### const FIXPOINT_STEP_LIMIT: usize

Source

#### const DIVIDE_AVAILABLE_DEPTH_ON_OVERFLOW: usize

## Required Associated Types§

Source

#### type Cx: Cx

Source

#### type ValidationScope

Source

#### type ProofTreeBuilder

## Required Methods§

Source

#### fn enter_validation_scope( cx: Self::Cx, input: <Self::Cx as Cx>::Input, ) -> Option<Self::ValidationScope>

Returning `Some` disables the global cache for the current goal.

The `ValidationScope` is used when fuzzing the search graph to track for which goals the global cache has been disabled. This is necessary as we may otherwise ignore the global cache entry for some goal `G` only to later use it, failing to detect a cycle goal and potentially changing the result.

Source

#### fn inspect_is_noop(inspect: &mut Self::ProofTreeBuilder) -> bool

Source

#### fn initial_provisional_result( cx: Self::Cx, kind: PathKind, input: <Self::Cx as Cx>::Input, ) -> <Self::Cx as Cx>::Result

Source

#### fn is_initial_provisional_result( result: <Self::Cx as Cx>::Result, ) -> Option<PathKind>

Source

#### fn stack_overflow_result( cx: Self::Cx, input: <Self::Cx as Cx>::Input, ) -> <Self::Cx as Cx>::Result

Source

#### fn fixpoint_overflow_result( cx: Self::Cx, input: <Self::Cx as Cx>::Input, ) -> <Self::Cx as Cx>::Result

Source

#### fn is_ambiguous_result( result: <Self::Cx as Cx>::Result, ) -> Option<<Self::Cx as Cx>::AmbiguityInfo>

Source

#### fn propagate_ambiguity( cx: Self::Cx, for_input: <Self::Cx as Cx>::Input, ambiguity_info: <Self::Cx as Cx>::AmbiguityInfo, ) -> <Self::Cx as Cx>::Result

Source

#### fn compute_goal( search_graph: &mut SearchGraph<Self>, cx: Self::Cx, input: <Self::Cx as Cx>::Input, inspect: &mut Self::ProofTreeBuilder, ) -> <Self::Cx as Cx>::Result

## Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

## Implementors§