pub trait ClassifierService: Send + Sync {
// Required methods
fn is_configured(&self) -> bool;
fn evaluate<'life0, 'async_trait>(
&'life0 self,
request: ClassificationRequest,
) -> Pin<Box<dyn Future<Output = Result<ClassificationOutcome>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn name(&self) -> &'static str { ... }
}Expand description
Host-owned service answering typed questions.
Required Methods§
Sourcefn is_configured(&self) -> bool
fn is_configured(&self) -> bool
Whether the deployment configured a real service.
Sourcefn evaluate<'life0, 'async_trait>(
&'life0 self,
request: ClassificationRequest,
) -> Pin<Box<dyn Future<Output = Result<ClassificationOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn evaluate<'life0, 'async_trait>(
&'life0 self,
request: ClassificationRequest,
) -> Pin<Box<dyn Future<Output = Result<ClassificationOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Answer every question in request over its state.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".