pub enum FailureKind {
MaxIter,
Provider,
ProviderPermanent,
ProviderRateLimited,
ProviderStream,
Truncated,
ContentFilter,
Middleware,
Tool,
SandboxOpen,
SandboxSave,
Storage,
}Expand description
失败的结构化类别。
Variants§
MaxIter
达到最大迭代步数。
Provider
调用 provider 建立流失败(网络 / 传输层)。
ProviderPermanent
provider 明确返回确定性失败,例如鉴权失败、请求格式错误、模型不存在。
ProviderRateLimited
provider 限流。
ProviderStream
流式响应过程中出错,或未收到正常收尾。
Truncated
模型输出被长度上限截断。
ContentFilter
模型输出被内容过滤拦截。
Middleware
中间件自身报错。
Tool
工具执行失败(模型可据错误结果调整后继续)。
SandboxOpen
打开沙箱失败。
SandboxSave
保存沙箱状态失败。
Storage
transcript/checkpoint 等持久化层失败。
Implementations§
Source§impl FailureKind
impl FailureKind
Trait Implementations§
Source§impl Clone for FailureKind
impl Clone for FailureKind
Source§fn clone(&self) -> FailureKind
fn clone(&self) -> FailureKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FailureKind
impl Debug for FailureKind
Source§impl<'de> Deserialize<'de> for FailureKind
impl<'de> Deserialize<'de> for FailureKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for FailureKind
impl Display for FailureKind
impl Eq for FailureKind
Source§impl PartialEq for FailureKind
impl PartialEq for FailureKind
Source§fn eq(&self, other: &FailureKind) -> bool
fn eq(&self, other: &FailureKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FailureKind
impl Serialize for FailureKind
impl StructuralPartialEq for FailureKind
Auto Trait Implementations§
impl Freeze for FailureKind
impl RefUnwindSafe for FailureKind
impl Send for FailureKind
impl Sync for FailureKind
impl Unpin for FailureKind
impl UnsafeUnpin for FailureKind
impl UnwindSafe for FailureKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.