pub trait RiskEngine:
Send
+ Sync
+ 'static {
// Required method
fn assess<'life0, 'life1, 'async_trait>(
&'life0 self,
signal: &'life1 RiskSignal,
) -> Pin<Box<dyn Future<Output = RiskVerdict> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Scores login attempts. Implementations must be cheap and non-blocking on the hot path (do any I/O against a cache, not a synchronous DB call).
Required Methods§
fn assess<'life0, 'life1, 'async_trait>(
&'life0 self,
signal: &'life1 RiskSignal,
) -> Pin<Box<dyn Future<Output = RiskVerdict> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".