pub enum HeliaError {
Show 24 variants
Libp2p(String),
Cid(Error),
Multihash(Error),
Multiaddr(String),
Io(Error),
Serialization(Error),
BlockNotFound {
cid: Cid,
},
PeerNotFound {
peer_id: PeerId,
},
Timeout,
Aborted,
InvalidInput {
message: String,
},
NodeNotStarted,
NodeAlreadyStarted,
CodecNotFound {
code: u64,
},
HasherNotFound {
code: u64,
},
PinNotFound {
cid: Cid,
},
PinAlreadyExists {
cid: Cid,
},
Datastore {
message: String,
},
Routing {
message: String,
},
Network {
message: String,
},
Dns(ResolveError),
NotFound(String),
OperationNotSupported(String),
Other {
message: String,
},
}Expand description
Main error type for Helia operations
Variants§
Libp2p(String)
Libp2p related errors (using string representation since libp2p::Error is complex)
Cid(Error)
CID parsing or validation errors
Multihash(Error)
Multihash errors
Multiaddr(String)
Multiaddr parsing errors
Io(Error)
I/O errors
Serialization(Error)
Serialization errors
BlockNotFound
Block not found
PeerNotFound
Peer not found
Timeout
Timeout error
Aborted
Abort error
InvalidInput
Invalid input
NodeNotStarted
Node not started
NodeAlreadyStarted
Node already started
CodecNotFound
Codec not found
HasherNotFound
Hasher not found
PinNotFound
Pin not found
PinAlreadyExists
Pin already exists
Datastore
Datastore error
Routing
Routing error
Network
Network error
Dns(ResolveError)
DNS resolution error
NotFound(String)
Not found error
OperationNotSupported(String)
Operation not supported
Other
Generic error with custom message
Implementations§
Source§impl HeliaError
impl HeliaError
Sourcepub fn invalid_input(message: impl Into<String>) -> Self
pub fn invalid_input(message: impl Into<String>) -> Self
Create a new invalid input error
Trait Implementations§
Source§impl Debug for HeliaError
impl Debug for HeliaError
Source§impl Display for HeliaError
impl Display for HeliaError
Source§impl Error for HeliaError
impl Error for HeliaError
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 HeliaError
impl From<Error> for HeliaError
Source§impl From<Error> for HeliaError
impl From<Error> for HeliaError
Source§impl From<Error> for HeliaError
impl From<Error> for HeliaError
Source§impl From<Error> for HeliaError
impl From<Error> for HeliaError
Source§impl From<ResolveError> for HeliaError
impl From<ResolveError> for HeliaError
Source§fn from(source: ResolveError) -> Self
fn from(source: ResolveError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HeliaError
impl !RefUnwindSafe for HeliaError
impl Send for HeliaError
impl Sync for HeliaError
impl Unpin for HeliaError
impl !UnwindSafe for HeliaError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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