pub enum PrefixStoreError {
NodeCreationMaxRetryError,
NodeNotFound,
StoreNotReadyError,
FatalError,
PathSelectionOutdated,
PrefixNotFound,
PrefixLengthInvalid,
BestPathNotFound,
RecordNotInMemory,
PersistFailed,
StatusUnknown,
}Expand description
Possible errors returned by methods on a RIB. Most of these errors are
Variants§
NodeCreationMaxRetryError
There is too much contention while creating a node: the store has given up. The method or function returning this error can be safely retries.
NodeNotFound
A node that does not exist (yet), maybe due to contention. The function or method causing this error can be safely retried.
StoreNotReadyError
The method returning this error presupposes a condition that has not been met, and may never be met. Retrying is safe, but may result in the same error. Therefore it should probably be retried only once.
FatalError
An unrecoverable error occurred, most probably during disk IO, or a
poisoned lock while writing. The store is probably corrupt. The caller
should terminate the store, and probably also terminate itself. This
error variant is the same as the FatalError type, but is used as a
return for methods that can also return non-fatal errors.
PathSelectionOutdated
A best path was requested, but the selection procedure was performed on a route set that is now stale. A new best path calculation over the set should be performed before retrying.
PrefixNotFound
The requested prefix was not found in the store.
PrefixLengthInvalid
The requested prefix length cannot exist.
BestPathNotFound
A best path was requested, but it was never calculated. Perform a best path selection first, before retrying.
RecordNotInMemory
A record was specifically requested from the in-memory data structure, but the record is not in memory. It may be persisted to disk.
PersistFailed
The method returning this error was trying to persist records to disk but failed. Retrying is safe, but may be yield the same result.
StatusUnknown
A status for a record was requested, but it was never set.
Trait Implementations§
Source§impl Debug for PrefixStoreError
impl Debug for PrefixStoreError
Source§impl Display for PrefixStoreError
impl Display for PrefixStoreError
Source§impl Error for PrefixStoreError
impl Error for PrefixStoreError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for PrefixStoreError
impl PartialEq for PrefixStoreError
Source§fn eq(&self, other: &PrefixStoreError) -> bool
fn eq(&self, other: &PrefixStoreError) -> bool
self and other values to be equal, and is used by ==.impl Eq for PrefixStoreError
impl StructuralPartialEq for PrefixStoreError
Auto Trait Implementations§
impl Freeze for PrefixStoreError
impl RefUnwindSafe for PrefixStoreError
impl Send for PrefixStoreError
impl Sync for PrefixStoreError
impl Unpin for PrefixStoreError
impl UnsafeUnpin for PrefixStoreError
impl UnwindSafe for PrefixStoreError
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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