Enum cannyls::ErrorKind

source ·
pub enum ErrorKind {
    DeviceBusy,
    DeviceTerminated,
    StorageFull,
    StorageCorrupted,
    InvalidInput,
    InconsistentState,
    Other,
}
Expand description

発生し得るエラーの種別.

Variants§

§

DeviceBusy

リクエストキューが詰まっている、等の過負荷状態.

また、初期化処理中の場合にも、このエラーが返される.

典型的な対応策

  • 利用者が時間をおいてリトライする
  • 優先度が低いリクエストの新規発行をしばらく控える
§

DeviceTerminated

デバイス(の管理スレッド)が停止しており、利用不可能.

正常・異常に関わらず、停止後のデバイスにリクエストが 発行された場合には、このエラーが返される.

典型的な対応策

  • デバイスを再起動する
§

StorageFull

ストレージに空き容量がない.

典型的な対応策

  • 利用者が不要なlumpを削除する
  • ストレージの容量を増やした上で、初期化・再構築を行う
§

StorageCorrupted

ストレージが破損している.

ジャーナル領域のチェックサム検証が失敗した場合等にこのエラーが返される.

典型的な対応策

  • もし人手で復旧可能な場合には復旧する
  • それが無理であれば、諦めて初期化(全削除)を行う
§

InvalidInput

入力が不正.

典型的な対応策

  • 利用者側のプログラムを修正して入力を正しくする
§

InconsistentState

内部状態が不整合に陥っている.

プログラムにバグがあることを示している.

典型的な対応策

  • バグ修正を行ってプログラムを更新する
§

Other

その他エラー.

E.g., I/Oエラー

典型的な対応策

  • 利用者側で(指数バックオフ等を挟みつつ)何度かリトライ
    • それでもダメなら、致命的な異常が発生していると判断

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
A short description of the error kind. Read more
Displays this kind. Read more
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Makes a TrackableError instance without cause. Read more
Makes a TrackableError instance with the specified cause. Read more
Takes over from other TrackableError instance. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.