[][src]Enum cannyls::ErrorKind

pub enum ErrorKind {
    DeviceBusy,
    DeviceTerminated,
    StorageFull,
    StorageCorrupted,
    InvalidInput,
    InconsistentState,
    Other,
}

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

Variants

DeviceBusy

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

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

典型的な対応策

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

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

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

典型的な対応策

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

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

典型的な対応策

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

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

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

典型的な対応策

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

入力が不正.

典型的な対応策

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

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

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

典型的な対応策

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

その他エラー.

E.g., I/Oエラー

典型的な対応策

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

Trait Implementations

impl From<ErrorKind> for Error
[src]

impl Eq for ErrorKind
[src]

impl Copy for ErrorKind
[src]

impl PartialEq<ErrorKind> for ErrorKind
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Clone for ErrorKind
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for ErrorKind
[src]

impl ErrorKind for ErrorKind
[src]

fn description(&self) -> &str
[src]

A short description of the error kind. Read more

fn display(&self, f: &mut Formatter) -> Result<(), Error>
[src]

Displays this kind. Read more

Auto Trait Implementations

impl Send for ErrorKind

impl Sync for ErrorKind

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]