pub trait InferenceRouter:
Send
+ Sync
+ 'static {
// Required methods
fn id(&self) -> InferenceRouterId;
fn route<'life0, 'async_trait>(
&'life0 self,
context: InferenceRoutingContext,
) -> Pin<Box<dyn Future<Output = Result<InferenceRoutingDecision>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn routing_options(&self) -> Vec<InferenceRoutingOptionDescriptor> { ... }
}Required Methods§
fn id(&self) -> InferenceRouterId
fn route<'life0, 'async_trait>(
&'life0 self,
context: InferenceRoutingContext,
) -> Pin<Box<dyn Future<Output = Result<InferenceRoutingDecision>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
fn routing_options(&self) -> Vec<InferenceRoutingOptionDescriptor>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".