pub enum Failure {
Exec(ExecError),
Remote {
error: ExecError,
retry_after: Option<u64>,
},
UnknownModel(String),
ImageOnly(String),
SpeechOnly(String),
Unavailable {
code: &'static str,
providers: Vec<String>,
model: String,
cause: Option<String>,
retry_after: Option<Duration>,
},
Cooldown {
model: String,
provider: String,
wait: Duration,
cause: Option<String>,
},
}Variants§
Exec(ExecError)
An executor or upstream error, rendered by the route’s error shape.
Remote
A trusted control-plane rejection (Go HomeConcurrencyBusyError): rendered like
Exec, with the Retry-After seconds it may expose.
UnknownModel(String)
No provider registered the model (Go getRequestDetails).
ImageOnly(String)
An image-only model on a non-image route.
SpeechOnly(String)
A speech-only model on a non-speech route (Go validateSpeechOnlyModel).
auth_not_found / auth_unavailable, enriched like Go.
Cooldown
Every candidate is cooling down for this model.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Failure
impl Forget for Failure
impl Move for Failure
impl RefUnwindSafe for Failure
impl Send for Failure
impl Sync for Failure
impl Unpin for Failure
impl UnsafeUnpin for Failure
impl UnwindSafe for Failure
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,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more