pub enum StorageError {
Io(Error),
CrcMismatch {
offset: u64,
expected: u32,
actual: u32,
},
InvalidFormat {
message: String,
},
SegmentNotFound {
segment_id: Uuid,
},
OffsetOutOfRange {
offset: u64,
},
Configuration {
message: String,
},
InsufficientSpace {
required: u64,
available: u64,
},
Synchronization {
message: String,
},
Serialization(Box<ErrorKind>),
Internal {
message: String,
},
}Expand description
Variants§
Io(Error)
I/Oエラー
CrcMismatch
データ整合性エラー - CRCチェック失敗
InvalidFormat
データフォーマットエラー
SegmentNotFound
セグメントが見つからない
OffsetOutOfRange
オフセット範囲外エラー
Configuration
設定エラー
InsufficientSpace
ディスク容量不足
Synchronization
同期エラー
Serialization(Box<ErrorKind>)
シリアライゼーションエラー
Internal
内部エラー(予期しないエラー)
Implementations§
Source§impl StorageError
impl StorageError
Sourcepub fn configuration(message: impl Into<String>) -> StorageError
pub fn configuration(message: impl Into<String>) -> StorageError
設定エラーを作成
Sourcepub fn invalid_format(message: impl Into<String>) -> StorageError
pub fn invalid_format(message: impl Into<String>) -> StorageError
データフォーマットエラーを作成
Sourcepub fn internal(message: impl Into<String>) -> StorageError
pub fn internal(message: impl Into<String>) -> StorageError
内部エラーを作成
Sourcepub fn synchronization(message: impl Into<String>) -> StorageError
pub fn synchronization(message: impl Into<String>) -> StorageError
同期エラーを作成
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Sourcepub fn severity(&self) -> ErrorSeverity
pub fn severity(&self) -> ErrorSeverity
Trait Implementations§
Source§impl Debug for StorageError
impl Debug for StorageError
Source§impl Display for StorageError
impl Display for StorageError
Source§impl Error for StorageError
impl Error for StorageError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for StorageError
impl From<Error> for StorageError
Source§fn from(source: Error) -> StorageError
fn from(source: Error) -> StorageError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for StorageError
impl !UnwindSafe for StorageError
impl Freeze for StorageError
impl Send for StorageError
impl Sync for StorageError
impl Unpin for StorageError
impl UnsafeUnpin for StorageError
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