pub enum LinkError {
NotFound(u128),
InvalidFormat(String),
StorageError(String),
QueryError(String),
ParseError(String),
Io(Error),
Doublets(String),
Lock(String),
Transaction(String),
AddressOutOfRange(u128),
}Expand description
Error types for link operations
Variants§
NotFound(u128)
No link exists at the requested address.
The address is widened to u128 so the same error type can be
used with every doublets address type (u32, u64, usize).
InvalidFormat(String)
StorageError(String)
QueryError(String)
ParseError(String)
Io(Error)
Filesystem failure while reading or writing a links database.
Doublets(String)
Failure reported by the underlying doublets store.
Lock(String)
Advisory file lock could not be acquired or released.
Transaction(String)
Invalid use of the transactions layer (nested transaction, …).
AddressOutOfRange(u128)
A recorded address does not fit into the configured address type.
Implementations§
Source§impl LinkError
impl LinkError
Sourcepub fn not_found<T: LinkReference>(index: T) -> Self
pub fn not_found<T: LinkReference>(index: T) -> Self
Builds a LinkError::NotFound from any doublets address type.
Trait Implementations§
Source§impl Error for LinkError
impl Error for LinkError
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 LinkError
impl !UnwindSafe for LinkError
impl Freeze for LinkError
impl Send for LinkError
impl Sync for LinkError
impl Unpin for LinkError
impl UnsafeUnpin for LinkError
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