#[non_exhaustive]pub enum Error {
Show 147 variants
EccSerializeFailed,
EccDeserializeFailed,
CurveHasherInitFailed,
CurveHasherFailed,
EdDSAPublicKeyBadFormat,
ECDSAPublicKeyBadFormat,
Secp256k1PointLiftFailed,
E2eStreamIdMismatch {
expected: Uuid,
actual: Uuid,
},
E2eFrameSequenceMismatch {
expected: u64,
actual: u64,
},
E2eFrameReorderWindowExceeded {
next_sequence: u64,
actual: u64,
window: u64,
},
E2eFrameSequenceOverflow,
E2eFrameAfterFinal,
E2eMissingFinalFrame,
E2ePublicKeyDidMismatch {
expected: Did,
actual: Did,
},
ECDSAError(Error),
PublicKeyBadFormat,
BlsAffineDecodeFailed,
PrivateKeyBadFormat,
InvalidTransport,
InvalidPublicKey,
EntryKindNotEqual,
EntryDidNotEqual,
EntryNotOverwritable,
EntryNotAppendable,
EntryDotIndexOutOfBounds {
index: usize,
},
InvalidAffineScalar,
StorageRedundancyMismatch {
configured: u16,
requested: u16,
},
Encode,
Decode,
Utf8Encoding(FromUtf8Error),
ServiceIOError(Error),
BadHexInCache(FromHexError),
BadCHexInCache,
URLParse(ParseError),
BadArrayInCache(TryFromSliceError),
SerializeToString,
SerializeError,
Serialize(Error),
Deserialize(Error),
CodecSerialize(Error),
CodecDeserialize(Error),
UnknownAccount,
VerifySignatureFailed,
InvalidRecoverId(u8),
GzipEncode,
GzipDecode,
PromiseStateFailed,
PromiseStateTimeout,
IceServerSchemeNotSupport(String),
IceServerURLMissHost,
MessageHandlerMissNextNode,
AlreadyConnected,
PendingConnectionCapacityExceeded {
capacity: usize,
},
PendingConnectionGenerationExhausted,
ConnectionAttemptSuperseded {
peer: Did,
generation: u64,
},
NotifyPredecessorOriginMismatch {
claimed: Did,
origin: Did,
},
NotifyPredecessorOriginNotAdmitted {
origin: Did,
},
SwarmConnectionLifecycleLock,
ShouldNotConnectSelf,
ChannelSendMessageFailed,
OutboundTransferCapacityExceeded {
peer: Did,
capacity: usize,
},
OutboundTransferMemoryCapacityExceeded {
peer: Did,
requested_bytes: usize,
capacity_bytes: usize,
},
OutboundTransferAdmissionTimeout {
peer: Did,
timeout_ms: u128,
},
OutboundFirstFrameAdmissionTimeout {
peer: Did,
timeout_ms: u128,
},
DetachedPayloadCleanupTimeout {
peer: Did,
timeout_ms: u128,
},
OutboundSchedulerRuntimeUnavailable,
CancelledDetachedAdmissionPublishedSuccess,
InboundMailboxCapacityExceeded {
capacity: usize,
},
InboundMailboxMemoryCapacityExceeded {
requested_bytes: usize,
capacity_bytes: usize,
},
InboundPeerCapacityExceeded {
peer: Option<Did>,
capacity: usize,
},
InboundPeerMemoryCapacityExceeded {
peer: Option<Did>,
requested_bytes: usize,
capacity_bytes: usize,
},
InboundMailboxClosed,
InboundMailboxRuntimeUnavailable,
InboundActorInvariantViolation,
NestedChunkMessage,
InvalidChunkMessage,
InboundValidationFailed {
source: CallbackError,
},
InboundValidationTimeout {
peer: Option<Did>,
timeout_ms: u128,
},
InboundCallbackFailed {
source: CallbackError,
},
InboundProcessingTimeout {
peer: Option<Did>,
timeout_ms: u128,
},
InboundTimerUnavailable {
peer: Option<Did>,
operation: &'static str,
},
ChannelRecvMessageFailed(String),
PeerRingInvalidAction,
FailedToReadSuccessors,
SuccessorIndexOutOfBounds {
index: usize,
len: usize,
},
FailedToWriteSuccessors,
PeerRingInvalidEntry,
PeerRingUnexpectedAction(Box<PeerRingAction>),
PeerRingFindSuccessor(String),
PeerRingNotFindClosestNode,
PeerRingUnlockFailed,
SwarmMissDidInTable(Did),
FailedOnGatherLocalCandidate(String),
NodeBehaviourBad(Did),
SwarmMissTransport(Did),
SwarmLoadMessageRecvFailed(String),
SwarmDefaultTransportNotConnected,
SwarmPendingTransTryLockFailed,
SwarmPendingTransNotFound,
SwarmToClosePrevTransport(String),
SessionTryLockFailed,
InvalidPeerType,
RTCPeerConnectionCreateFailed(Error),
RTCPeerConnectionNotEstablish,
RTCPeerConnectionCreateOfferFailed(Error),
RTCPeerConnectionCreateAnswerFailed(Error),
RTCDataChannelMessageIncomplete(usize, usize),
RTCDataChannelSendTextFailed(Error),
RTCDataChannelNotReady,
RTCDataChannelStateNotOpen,
TransportNotReady {
state: WebrtcConnectionState,
data_channel_open: bool,
},
RTCPeerConnectionAddIceCandidateError(Error),
RTCPeerConnectionSetLocalDescFailed(Error),
RTCPeerConnectionSetRemoteDescFailed(Error),
RTCPeerConnectionCloseFailed(Error),
RTCSdpTypeNotMatch,
ConnectionNotFound,
InvalidTransportUuid,
UnexpectedEncryptedData,
DecryptionError,
InvalidNextHop,
InvalidRelayPath,
InfiniteRelayPath,
InvalidRelayDestination,
CannotInferNextHop,
NoNextHop,
ReportNeedSend,
ResetDestinationNeedSend,
InvalidCapacity,
EntryNotFound,
IOError(Error),
DHTSyncLockError,
CallbackSyncLockError,
SwarmBuildFailed(String),
InvalidMessage(String),
MessageEncryptionFailed(String),
MessageDecryptionFailed(String),
MessageTooLarge(usize),
MessageSizeOverflow,
PeerMaxMessageSizeTooSmall(usize),
DataChannelSendQueueTimeout {
peer: Did,
timeout_ms: u128,
bytes: usize,
context: &'static str,
},
DataChannelSendCompletionTimeout {
peer: Did,
timeout_ms: u128,
bytes: usize,
context: &'static str,
},
DataChannelDeliveryTimeout {
peer: Did,
timeout_ms: u128,
context: &'static str,
},
TrackedPayloadCleanupTimeout {
peer: Did,
timeout_ms: u128,
},
SessionExpired,
Transport(Error),
JsError(String),
}Expand description
Errors collections in ring-core.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EccSerializeFailed
Serialize affine failed
EccDeserializeFailed
desrialize affine failed
CurveHasherInitFailed
Failed to initialize Curve hasher
CurveHasherFailed
Failed to hash data into cruve
EdDSAPublicKeyBadFormat
Ed25519/EdDSA pubkey bad format
ECDSAPublicKeyBadFormat
Secp256k1/ECDSA pubkey bad format
Secp256k1PointLiftFailed
Failed to lift encoded plaintext into a secp256k1 point
E2eStreamIdMismatch
E2E stream id mismatch: expected {expected}, actual {actual}
Fields
E2eFrameSequenceMismatch
E2E frame sequence mismatch: expected {expected}, actual {actual}
Fields
E2eFrameReorderWindowExceeded
E2E frame sequence is outside the accepted reorder window.
Fields
E2eFrameSequenceOverflow
E2E frame sequence counter overflowed
E2eFrameAfterFinal
E2E frame received after the authenticated final frame
E2eMissingFinalFrame
E2E stream is missing the authenticated final frame
E2ePublicKeyDidMismatch
E2E public key resolves to {actual}, expected {expected}
Fields
ECDSAError(Error)
Secp256r1/ECDSA Error: {0}
PublicKeyBadFormat
ECDSA or EdDSA pubkey bad format
BlsAffineDecodeFailed
Failed to decode vector to bls affine
PrivateKeyBadFormat
private bad format
InvalidTransport
Invalid Transport
InvalidPublicKey
InvalidPublicKey
EntryKindNotEqual
Entry kind not equal when overwriting
EntryDidNotEqual
Did of Entry not equal
EntryNotOverwritable
The type of Entry is not allowed to be overwritten
EntryNotAppendable
The type of Entry is not allowed to be appended
EntryDotIndexOutOfBounds
Entry dot index {index} is out of bounds
InvalidAffineScalar
Affine rotation scalar must be greater than zero
StorageRedundancyMismatch
Storage redundancy mismatch: transport configured {configured}, storage request uses {requested}
Fields
Encode
Encode a byte vector into a base58-check string, adds 4 bytes checksum
Decode
Decode base58-encoded with 4 bytes checksum string into a byte vector
Utf8Encoding(FromUtf8Error)
Couldn’t decode data as UTF-8.
ServiceIOError(Error)
IOError
BadHexInCache(FromHexError)
Invalid hexadecimal id in directory cache
BadCHexInCache
Invalid rustc hexadecimal id in directory cache
URLParse(ParseError)
URL parse error
BadArrayInCache(TryFromSliceError)
Invalid hexadecimal id in directory cache
SerializeToString
JSON serialize toString error
SerializeError
Serialization error
Serialize(Error)
JSON serialization error
Deserialize(Error)
JSON deserialization error
CodecSerialize(Error)
Codec serialization error
CodecDeserialize(Error)
Codec deserialization error
UnknownAccount
Unknown account
VerifySignatureFailed
Failed on verify message signature
InvalidRecoverId(u8)
ECDSA Invalid recover Id {0}
GzipEncode
Gzip encode error.
GzipDecode
Gzip decode error.
PromiseStateFailed
Failed on promise, state is not succeeded
PromiseStateTimeout
promise timeout, state is not succeeded
IceServerSchemeNotSupport(String)
Ice server scheme {0} has not supported yet
IceServerURLMissHost
Ice server get url without host
MessageHandlerMissNextNode
Cannot find next node by local DHT
AlreadyConnected
Found existing transport when answer offer from remote node
PendingConnectionCapacityExceeded
Pending WebRTC connection capacity {capacity} is exhausted
PendingConnectionGenerationExhausted
Pending WebRTC connection generation id space is exhausted.
ConnectionAttemptSuperseded
Connection attempt {generation} for {peer} was replaced before setup completed.
Fields
NotifyPredecessorOriginMismatch
A predecessor notification claims a DID different from its signed origin.
Fields
NotifyPredecessorOriginNotAdmitted
A predecessor notification originated from a peer without an admitted connection.
SwarmConnectionLifecycleLock
Failed to access the swarm connection lifecycle state
ShouldNotConnectSelf
You should not connect to yourself
ChannelSendMessageFailed
Send message through channel failed
OutboundTransferCapacityExceeded
The per-peer outbound scheduler has admitted its maximum transfer count.
Fields
OutboundTransferMemoryCapacityExceeded
The outbound scheduler cannot retain another payload within its byte budget.
Fields
OutboundTransferAdmissionTimeout
A detached send could not obtain bounded scheduler capacity in time.
Fields
OutboundFirstFrameAdmissionTimeout
A detached transfer did not admit its first frame before its deadline.
Fields
DetachedPayloadCleanupTimeout
A detached transfer did not stop within its post-deadline cleanup grace.
Fields
No Tokio runtime is available to host a native outbound scheduler.
CancelledDetachedAdmissionPublishedSuccess
A cancelled detached admission unexpectedly published send success.
InboundMailboxCapacityExceeded
The inbound actor has admitted its maximum number of messages.
InboundMailboxMemoryCapacityExceeded
The inbound actor cannot retain another message within its byte budget.
Fields
InboundPeerCapacityExceeded
One peer has exhausted its inbound message count allowance.
Fields
InboundPeerMemoryCapacityExceeded
One peer has exhausted its inbound retained-memory allowance.
Fields
InboundMailboxClosed
The connection’s inbound mailbox actor is unavailable.
No Tokio runtime is available to host a native inbound actor.
InboundActorInvariantViolation
The inbound actor observed an impossible message/lane state.
NestedChunkMessage
A reassembled chunk payload attempted to contain another chunk envelope.
InvalidChunkMessage
A chunk was rejected for an invalid remote wire shape or metadata.
InboundValidationFailed
The application rejected an inbound message during validation.
Fields
source: CallbackErrorOriginal application validation error.
InboundValidationTimeout
An application validation callback did not complete within its deadline.
Fields
InboundCallbackFailed
An application callback failed after core inbound handling.
Fields
source: CallbackErrorOriginal application callback error.
InboundProcessingTimeout
Inbound handling and its application callback did not complete within the deadline.
Fields
The browser runtime could not schedule an inbound deadline timer.
ChannelRecvMessageFailed(String)
Recv message through channel failed {0}
PeerRingInvalidAction
Invalid PeerRingAction
FailedToReadSuccessors
Failed on read successors
SuccessorIndexOutOfBounds
Successor index {index} is out of bounds for length {len}
FailedToWriteSuccessors
Failed on write successors
PeerRingInvalidEntry
Failed on TryInto Entry
PeerRingUnexpectedAction(Box<PeerRingAction>)
Unexpected PeerRingAction, {0:?}
PeerRingFindSuccessor(String)
PeerRing findsuccessor error, {0}
PeerRingNotFindClosestNode
PeerRing cannot find closest preceding node
PeerRingUnlockFailed
PeerRing RWLock unlock failed
SwarmMissDidInTable(Did)
Cannot seek did in swarm table, {0}
FailedOnGatherLocalCandidate(String)
Cannot gather local candidate, {0}
NodeBehaviourBad(Did)
Node behaviour bad
SwarmMissTransport(Did)
Cannot get transport from did: {0}
SwarmLoadMessageRecvFailed(String)
Load message failed with message: {0}
SwarmDefaultTransportNotConnected
Default transport is not connected
SwarmPendingTransTryLockFailed
call lock() failed
SwarmPendingTransNotFound
transport not found
SwarmToClosePrevTransport(String)
failed to close previous when registering, {0}
SessionTryLockFailed
call lock() failed
InvalidPeerType
Invalid peer type
RTCPeerConnectionCreateFailed(Error)
RTC new peer connection failed
RTCPeerConnectionNotEstablish
RTC peer_connection not establish
RTCPeerConnectionCreateOfferFailed(Error)
RTC peer_connection fail to create offer
RTCPeerConnectionCreateAnswerFailed(Error)
RTC peer_connection fail to create answer
RTCDataChannelMessageIncomplete(usize, usize)
DataChannel message size not match, {0} < {1}
RTCDataChannelSendTextFailed(Error)
DataChannel send text message failed
RTCDataChannelNotReady
DataChannel not ready
RTCDataChannelStateNotOpen
DataChannel state not open
TransportNotReady
The observed WebRTC/data-channel product state cannot make progress.
Fields
state: WebrtcConnectionStateObserved WebRTC peer-connection state.
RTCPeerConnectionAddIceCandidateError(Error)
RTC peer_connection add ice candidate error
RTCPeerConnectionSetLocalDescFailed(Error)
RTC peer_connection set local description failed
RTCPeerConnectionSetRemoteDescFailed(Error)
RTC peer_connection set remote description failed
RTCPeerConnectionCloseFailed(Error)
RTC peer_connection failed to close it
RTCSdpTypeNotMatch
RTC unsupported sdp type
ConnectionNotFound
Connection not Found
InvalidTransportUuid
Invalid Transport Id
UnexpectedEncryptedData
Unexpected encrypted data
DecryptionError
Failed to decrypt data
InvalidNextHop
Current node is not the next hop of message
InvalidRelayPath
Adjacent elements in path cannot be equal
InfiniteRelayPath
Suspected infinite looping in path
InvalidRelayDestination
The destination of report message should always be the first element of path
CannotInferNextHop
Cannot infer next hop
NoNextHop
Cannot get next hop when sending message
ReportNeedSend
To generate REPORT, you should provide SEND
ResetDestinationNeedSend
Only SEND message can reset destination
InvalidCapacity
Invalid capacity value
EntryNotFound
entry not found
IOError(Error)
IO error: {0}
DHTSyncLockError
Failed to get dht from a sync lock
CallbackSyncLockError
Failed to lock callback of swarm
SwarmBuildFailed(String)
Failed to build swarm: {0}
InvalidMessage(String)
Message invalid: {0}
MessageEncryptionFailed(String)
Message encryption failed
MessageDecryptionFailed(String)
Message decryption failed
MessageTooLarge(usize)
Message has {0} bytes which is too large
MessageSizeOverflow
A serialized message size cannot be represented by the local platform.
PeerMaxMessageSizeTooSmall(usize)
Peer’s negotiated max_message_size {0} is too small to carry even one chunk
DataChannelSendQueueTimeout
Timed out while waiting for the data-channel send queue to accept bytes
Fields
DataChannelSendCompletionTimeout
Timed out after the backend crossed its final cancellable send boundary.
Fields
DataChannelDeliveryTimeout
Timed out while waiting for accepted data-channel bytes to leave the local buffer.
Fields
TrackedPayloadCleanupTimeout
A tracked transfer did not stop within its post-deadline cleanup grace.
Fields
SessionExpired
Session is expired
Transport(Error)
Transport error: {0}
JsError(String)
External Javascript error: {0}
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<FromHexError> for Error
impl From<FromHexError> for Error
Source§fn from(source: FromHexError) -> Self
fn from(source: FromHexError) -> Self
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<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Source§impl From<TryFromSliceError> for Error
impl From<TryFromSliceError> for Error
Source§fn from(source: TryFromSliceError) -> Self
fn from(source: TryFromSliceError) -> 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,
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>
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.