#[non_exhaustive]pub enum RoutingError {
NoProvidersConfigured {
purpose: ModelPurpose,
},
NoCandidate {
purpose: ModelPurpose,
required_structured_output: Vec<StructuredOutputCapability>,
rejections: Vec<CandidateRejection>,
},
}Expand description
Routing produced no candidate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NoProvidersConfigured
The pool holds no profile at all.
Fields
§
purpose: ModelPurposeThe stage that needed one.
NoCandidate
Every configured profile was rejected.
Fields
§
purpose: ModelPurposeThe stage that needed one.
§
required_structured_output: Vec<StructuredOutputCapability>The structured-output transports the stage required, when it required any. Kept separate so the caller can report exactly what could not be met without re-deriving it.
§
rejections: Vec<CandidateRejection>Every profile considered, with its reason, in pool order.
Implementations§
Source§impl RoutingError
impl RoutingError
Sourcepub fn structured_output_unmet(&self) -> bool
pub fn structured_output_unmet(&self) -> bool
Returns true when at least one profile failed on the structured-output
requirement — the case spec §0 rule 9 forbids resolving by downgrading.
Sourcepub const fn purpose(&self) -> ModelPurpose
pub const fn purpose(&self) -> ModelPurpose
The stage that could not be routed.
Trait Implementations§
Source§impl Clone for RoutingError
impl Clone for RoutingError
Source§impl Debug for RoutingError
impl Debug for RoutingError
Source§impl Display for RoutingError
impl Display for RoutingError
impl Eq for RoutingError
Source§impl Error for RoutingError
impl Error for RoutingError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for RoutingError
impl PartialEq for RoutingError
impl StructuralPartialEq for RoutingError
Auto Trait Implementations§
impl Freeze for RoutingError
impl RefUnwindSafe for RoutingError
impl Send for RoutingError
impl Sync for RoutingError
impl Unpin for RoutingError
impl UnsafeUnpin for RoutingError
impl UnwindSafe for RoutingError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.