pub enum Error {
Show 16 variants
Io(Error),
BlockNotFound(String),
Cid(String),
Serialization(String),
Deserialization(String),
Network(String),
Storage(String),
Encryption(String),
InvalidData(String),
InvalidInput(String),
NotFound(String),
Protocol(String),
NotImplemented(String),
Internal(String),
Initialization(String),
Verification(String),
}Expand description
Unified error type for IPFRS operations.
This enum captures all error conditions that can occur in IPFRS, providing detailed context through error messages.
Variants§
Io(Error)
File system or network I/O error
BlockNotFound(String)
Requested block was not found in storage
Cid(String)
CID parsing, generation, or validation error
Serialization(String)
Data serialization error (CBOR, JSON, etc.)
Deserialization(String)
Data deserialization error (CBOR, JSON, etc.)
Network(String)
Network communication error
Storage(String)
Storage backend error (disk, memory, S3, etc.)
Encryption(String)
Encryption or decryption error
InvalidData(String)
Data validation error (malformed blocks, invalid sizes, etc.)
InvalidInput(String)
Invalid user input or parameters
NotFound(String)
Requested resource not found
Protocol(String)
IPFS protocol violation or incompatibility
NotImplemented(String)
Feature not yet implemented
Internal(String)
Unexpected internal error (possible bug)
Initialization(String)
System initialization or setup error
Verification(String)
Signature or cryptographic verification error
Implementations§
Source§impl Error
impl Error
Sourcepub const fn is_not_found(&self) -> bool
pub const fn is_not_found(&self) -> bool
Check if this is a block not found error
Sourcepub const fn is_serialization(&self) -> bool
pub const fn is_serialization(&self) -> bool
Check if this is a serialization/deserialization error
Sourcepub const fn is_network(&self) -> bool
pub const fn is_network(&self) -> bool
Check if this is a network error
Sourcepub const fn is_storage(&self) -> bool
pub const fn is_storage(&self) -> bool
Check if this is a storage error
Sourcepub const fn is_validation(&self) -> bool
pub const fn is_validation(&self) -> bool
Check if this is a validation error
Sourcepub const fn is_verification(&self) -> bool
pub const fn is_verification(&self) -> bool
Check if this is a verification error
Sourcepub const fn is_recoverable(&self) -> bool
pub const fn is_recoverable(&self) -> bool
Check if this error is recoverable (retrying might help)
Sourcepub const fn is_internal(&self) -> bool
pub const fn is_internal(&self) -> bool
Check if this error indicates a bug or unexpected condition
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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<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