pub struct RoutingOutcome {
pub selected_model_ids: Vec<ModelId>,
pub request: Request,
pub response: Option<Response>,
}Expand description
The terminal result of routing.
Fields§
§selected_model_ids: Vec<ModelId>Models selected by the algorithm, ordered best model first.
request: RequestThe request after all routing-time rewrites, stamped with the selected model.
response: Option<Response>A response produced while routing, or None when the client must make the answer call.
Implementations§
Source§impl RoutingOutcome
impl RoutingOutcome
Sourcepub fn selected_model_id(&self) -> Result<&ModelId>
pub fn selected_model_id(&self) -> Result<&ModelId>
The model the algorithm recommends, the best model for this request.
LibsyError::NoTargets if the algorithm selected no models, which should be impossible.
Auto Trait Implementations§
impl Freeze for RoutingOutcome
impl !RefUnwindSafe for RoutingOutcome
impl Send for RoutingOutcome
impl !Sync for RoutingOutcome
impl Unpin for RoutingOutcome
impl UnsafeUnpin for RoutingOutcome
impl !UnwindSafe for RoutingOutcome
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more