pub enum DbError {
Storage(Error),
ReadOnly,
LowSpace {
free: u64,
min_free: u64,
},
NoHistory {
height: u64,
from: u64,
},
NoCheckpoint {
height: u64,
},
Format(Option<u32>),
NotIndexed {
through: u64,
},
NoNetwork,
OtherNetwork,
}Expand description
DB のエラー。
Variants§
Storage(Error)
redb が返したもの
ReadOnly
読むだけに開いた DB に書こうとした
LowSpace
ディスクの空きが決めた量より少ないので、書く前に止めた
NoHistory
差分を残し始めるより前の高さの状態を引こうとした
NoCheckpoint
巻き戻す先の高さ以下に、チェックポイントがない
Format(Option<u32>)
形の版が FORMAT でない(None は印がない)
NotIndexed
history をまだ作っていない高さがあるので、昔の値は引けない
NoNetwork
トランザクションの索引を作るのに、ネットワークの値がない(Db::set_transaction_network)
OtherNetwork
しまってあるネットワークの値が、渡されたものと違う(別のネットワークの DB)
Trait Implementations§
Source§impl Error for DbError
impl Error for DbError
1.30.0 · 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()
Auto Trait Implementations§
impl !RefUnwindSafe for DbError
impl !UnwindSafe for DbError
impl Freeze for DbError
impl Send for DbError
impl Sync for DbError
impl Unpin for DbError
impl UnsafeUnpin for DbError
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more