Skip to main content

InferenceRouter

Trait InferenceRouter 

Source
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§

Source

fn id(&self) -> InferenceRouterId

Source

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§

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§