Skip to main content

HostError

Enum HostError 

Source
pub enum HostError {
Show 13 variants InvalidArtifact(String), InvalidOperation(String), Abi(String), Limit(String), Process(String), Timeout, Health(String), Slot(String), Policy(String), Contract(String), State(String), Registry(String), Io(Error),
}
Expand description

Failure returned at the plugin-host seam. 插件宿主接口返回的失败。

Variants§

§

InvalidArtifact(String)

The artifact failed structural checks such as checksum or Wasm validation. 工件未通过校验和、Wasm 格式等结构检查。

§

InvalidOperation(String)

The operation name is not a valid plugin identifier. 操作名不是合法的插件标识符。

§

Abi(String)

The plugin’s exports or ABI version contradict the host contract. 插件的导出或 ABI 版本与宿主契约不符。

§

Limit(String)

A declared resource budget (fuel, memory, input, or output) was exceeded. 超出声明的资源预算(燃料、内存、输入或输出)。

§

Process(String)

The child process could not start, exited non-zero, or broke its pipes. 子进程无法启动、非零退出或管道中断。

§

Timeout

The call exceeded its hard deadline and the host killed it. 调用超出硬超时,宿主已将其中止。

§

Health(String)

The health probe answered something other than ok. 健康探针的回答不是 ok。

§

Slot(String)

The slot is unknown, malformed, or carries no installed generation. 插件槽未知、定义非法,或没有已安装的代际。

§

Policy(String)

The slot’s trust lane or manifest policy rejected the artifact. 插件槽的信任通道或清单策略拒绝了该工件。

§

Contract(String)

The artifact’s flow contract does not match the slot’s contract. 工件的数据流合同与插件槽的合同不匹配。

§

State(String)

Host bookkeeping state is unusable, typically a poisoned lock. 宿主簿记状态不可用,通常是锁被毒化。

§

Registry(String)

The registry graft needed to publish a deployment failed. 发布部署所需的注册树嫁接失败。

§

Io(Error)

Underlying I/O failure; the only variant that exposes a source error. 底层 I/O 失败;唯一会暴露源错误的变体。

Trait Implementations§

Source§

impl Debug for HostError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for HostError

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for HostError

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for HostError

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.