#[non_exhaustive]#[repr(u32)]pub enum Error {
Show 70 variants
RemoteRpcError(String),
UnknownRpcError = 101,
InternalRpcError(Error),
UuidError(Error),
ConnectionNotFound = 203,
NewConnectionError(Error),
CloseConnectionError(Error),
InvalidConnectionId = 206,
CreateOffer(Error),
AnswerOffer(Error),
AcceptAnswer(Error),
DecodeError = 300,
EncodeError = 301,
WasmCompileError(String),
WasmBackendMessageRwLockError = 401,
WasmInstantiationError = 402,
WasmExportError = 403,
WasmRuntimeError(String),
WasmGlobalMemoryLockError = 405,
WasmFailedToLoadFile = 406,
InvalidDid(String),
InvalidMethod = 501,
InternalError(Error),
NoPermission = 504,
ConnectError(Error),
SendMessage(Error),
EntryError(Error),
ServiceRegisterError(Error),
JsError(String),
InvalidMessage = 800,
HttpRequestError(String),
InvalidData = 802,
InvalidService = 803,
InvalidAddress = 804,
InvalidAuthData = 805,
InvalidHeaders = 806,
Storage(Error),
Swarm(Error),
InvalidLoggingLevel(String),
InvalidWebrtcUdpPortRange(WebrtcUdpPortRangeError),
IncompleteWebrtcUdpPortRange {
min: Option<u16>,
max: Option<u16>,
},
InvalidConfig(String),
BrowserStorageOpen {
name: String,
source: Error,
},
RegistrationStopped = 815,
MeasurementRuntime(MeasureRuntimeError),
CreateFileError(String),
OpenFileError(String),
Lock = 902,
HomeDirError = 903,
ParentDirError = 904,
PathUtf8Error(String),
SerdeJsonError(Error),
SerdeYamlError(Error),
VerifyError(String),
CoreError(Error),
ExternalError(String),
FFINulError(NulError),
FFICStrError(Utf8Error),
FFINulPtrError = 1_205,
FFIFromUtf8Error(FromUtf8Error),
BackendError(String),
ExtensionError(String),
DetachedExtensionTaskClosed = 1_503,
OnionRouteError(OnionRouteError),
OnionProxyIoError(String),
OnionProxyRequestTimedOut = 1_603,
OnionQueueAdmission {
queue: OnionQueueKind,
peer: Did,
reason: OnionQueueAdmissionReason,
},
OnionProxyTarget(OnionProxyTargetError),
OnionTargetResolve {
authority: String,
source: Error,
},
OnionTargetResolvedEmpty {
authority: String,
},
}Expand description
Errors enum mapping global custom errors. The error type can be expressed in decimal, where the high decs represent the error category and the low decs represent the error type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RemoteRpcError(String)
Connecting to a remote JSON-RPC server failed.
UnknownRpcError = 101
A remote JSON-RPC error did not match a known local variant.
InternalRpcError(Error)
The internal JSON-RPC dispatcher returned an error.
UuidError(Error)
UUID parsing or formatting failed.
ConnectionNotFound = 203
The requested connection does not exist in the local swarm.
NewConnectionError(Error)
Opening a new connection through the core swarm failed.
CloseConnectionError(Error)
Closing an existing connection through the core swarm failed.
InvalidConnectionId = 206
The supplied connection identifier is malformed or unknown.
CreateOffer(Error)
Creating WebRTC offer data failed.
AnswerOffer(Error)
Creating WebRTC answer data failed.
AcceptAnswer(Error)
Accepting WebRTC answer data failed.
DecodeError = 300
Decoding structured data failed.
EncodeError = 301
Encoding structured data failed.
WasmCompileError(String)
Compiling a WASM artifact failed.
WasmBackendMessageRwLockError = 401
Acquiring the WASM backend-message lock failed.
WasmInstantiationError = 402
Instantiating a WASM module failed.
WasmExportError = 403
Resolving a required WASM export failed.
WasmRuntimeError(String)
Executing WASM code returned a runtime error.
WasmGlobalMemoryLockError = 405
Acquiring the WASM global memory lock failed.
WasmFailedToLoadFile = 406
Loading a WASM input file failed.
InvalidDid(String)
Parsing or validating a DID failed.
InvalidMethod = 501
The requested JSON-RPC method is not supported.
InternalError(Error)
A core internal operation failed.
NoPermission = 504
The caller is not authorized to perform the requested action.
ConnectError(Error)
Connecting to a peer failed.
SendMessage(Error)
Sending a peer message failed.
EntryError(Error)
Applying a DHT entry action failed.
ServiceRegisterError(Error)
Registering a service descriptor failed.
JsError(String)
JavaScript host code returned an error.
InvalidMessage = 800
A protocol message failed validation.
HttpRequestError(String)
An HTTP proxy request failed validation.
InvalidData = 802
Input data failed semantic validation.
InvalidService = 803
A service name or service descriptor is invalid.
InvalidAddress = 804
A network address is invalid.
InvalidAuthData = 805
Authentication payload data is invalid.
InvalidHeaders = 806
Request headers are missing required values or contain invalid values.
Storage(Error)
Persistent or cache storage returned an error.
Swarm(Error)
Swarm state management returned an error.
InvalidLoggingLevel(String)
The requested logging level is not supported.
InvalidWebrtcUdpPortRange(WebrtcUdpPortRangeError)
The configured WebRTC UDP port range is invalid.
IncompleteWebrtcUdpPortRange
Only one side of the WebRTC UDP port range was configured.
Fields
InvalidConfig(String)
The node configuration is structurally invalid.
BrowserStorageOpen
Opening browser IndexedDB-backed provider storage failed.
Fields
RegistrationStopped = 815
A periodic registration task observed a cooperative stop request.
MeasurementRuntime(MeasureRuntimeError)
Loading or explicitly flushing local peer measurements failed.
CreateFileError(String)
Creating a file on disk failed.
OpenFileError(String)
Opening a file on disk failed.
Lock = 902
Acquiring a synchronization lock failed.
HomeDirError = 903
The process home directory could not be resolved.
ParentDirError = 904
The parent directory of a path could not be resolved.
PathUtf8Error(String)
A filesystem path cannot be represented as UTF-8.
SerdeJsonError(Error)
JSON serialization or deserialization failed.
SerdeYamlError(Error)
YAML serialization or deserialization failed.
VerifyError(String)
Cryptographic verification failed.
CoreError(Error)
A rings-core operation returned an error.
ExternalError(String)
An external signer returned an error.
FFINulError(NulError)
An FFI string contained an interior nul byte.
FFICStrError(Utf8Error)
Converting an FFI C string to UTF-8 failed.
FFINulPtrError = 1_205
An FFI pointer argument was null.
FFIFromUtf8Error(FromUtf8Error)
Converting owned FFI bytes to UTF-8 failed.
BackendError(String)
A protocol backend returned an error.
ExtensionError(String)
An extension runtime returned an error.
DetachedExtensionTaskClosed = 1_503
An owned extension task ended before publishing its result.
OnionRouteError(OnionRouteError)
Onion route construction or validation failed.
OnionProxyIoError(String)
Onion proxy I/O failed.
OnionProxyRequestTimedOut = 1_603
A local onion proxy request did not complete before its deadline.
OnionQueueAdmission
A bounded onion or relay send queue rejected one item.
Fields
queue: OnionQueueKindQueue whose bound was reached.
reason: OnionQueueAdmissionReasonExact admission relation that failed.
OnionProxyTarget(OnionProxyTargetError)
An onion proxy authority failed closed parsing.
OnionTargetResolve
Runtime DNS resolution of an admitted onion target failed.
OnionTargetResolvedEmpty
Runtime DNS resolution returned no addresses.
Fields
Canonical target authority.
Implementations§
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
use the Display impl or to_string()
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Source§impl From<MeasureRuntimeError> for Error
impl From<MeasureRuntimeError> for Error
Source§fn from(source: MeasureRuntimeError) -> Self
fn from(source: MeasureRuntimeError) -> Self
Source§impl From<OnionProxyTargetError> for Error
impl From<OnionProxyTargetError> for Error
Source§fn from(source: OnionProxyTargetError) -> Self
fn from(source: OnionProxyTargetError) -> Self
Source§impl From<WebrtcUdpPortRangeError> for Error
impl From<WebrtcUdpPortRangeError> for Error
Source§fn from(source: WebrtcUdpPortRangeError) -> Self
fn from(source: WebrtcUdpPortRangeError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T> MaybeSend for T
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.