Skip to main content

DecisionEngine

Trait DecisionEngine 

Source
pub trait DecisionEngine:
    Debug
    + Send
    + Sync {
    // Required method
    fn decide<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 DecisionRequest,
    ) -> Pin<Box<dyn Future<Output = Result<DecisionResponse, DecisionError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Provider-independent asynchronous decision engine.

Required Methods§

Source

fn decide<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 DecisionRequest, ) -> Pin<Box<dyn Future<Output = Result<DecisionResponse, DecisionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Evaluate a bounded request.

§Errors

Returns a content-free DecisionError for invalid input, provider failures, or an invalid response.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§