pub trait JudgmentProvider:
Send
+ Sync
+ 'static {
type Error: Error + Send + Sync + 'static;
// Required method
fn judge<'life0, 'async_trait>(
&'life0 self,
request: JudgmentRequest,
) -> Pin<Box<dyn Future<Output = Result<JudgmentResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
The seam between a decision site and any concrete judgment backend.
One implementation per backend. A decision site holds a
DynJudgment and never names the backend.
Required Associated Types§
Required Methods§
Sourcefn judge<'life0, 'async_trait>(
&'life0 self,
request: JudgmentRequest,
) -> Pin<Box<dyn Future<Output = Result<JudgmentResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn judge<'life0, 'async_trait>(
&'life0 self,
request: JudgmentRequest,
) -> Pin<Box<dyn Future<Output = Result<JudgmentResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Answers every question in request over its state.
§Errors
Returns the backend’s error when the request is rejected, the credential is refused, the transport fails, or the response does not decode.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".