Skip to main content

Error

Enum Error 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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

§expected: Uuid

Stream ID expected by the decryptor.

§actual: Uuid

Stream ID carried by the frame.

§

E2eFrameSequenceMismatch

E2E frame sequence mismatch: expected {expected}, actual {actual}

Fields

§expected: u64

Sequence number expected by the decryptor.

§actual: u64

Sequence number carried by the frame.

§

E2eFrameReorderWindowExceeded

E2E frame sequence is outside the accepted reorder window.

Fields

§next_sequence: u64

Next contiguous sequence number expected by the decryptor.

§actual: u64

Sequence number carried by the frame.

§window: u64

Maximum accepted gap ahead of the next sequence.

§

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

§expected: Did

DID expected by the signed message context.

§actual: Did

DID derived from the supplied public key.

§

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

Fields

§index: usize

Dot index that could not be represented.

§

InvalidAffineScalar

Affine rotation scalar must be greater than zero

§

StorageRedundancyMismatch

Storage redundancy mismatch: transport configured {configured}, storage request uses {requested}

Fields

§configured: u16

Redundancy configured on swarm transport for repair.

§requested: u16

Redundancy requested by the storage API const generic.

§

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

Fields

§capacity: usize

Maximum number of concurrent pending peers.

§

PendingConnectionGenerationExhausted

Pending WebRTC connection generation id space is exhausted.

§

ConnectionAttemptSuperseded

Connection attempt {generation} for {peer} was replaced before setup completed.

Fields

§peer: Did

Peer whose connection generation changed.

§generation: u64

Generation that no longer owns the peer slot.

§

NotifyPredecessorOriginMismatch

A predecessor notification claims a DID different from its signed origin.

Fields

§claimed: Did

DID claimed by the notification body.

§origin: Did

DID authenticated by the signed relay origin.

§

NotifyPredecessorOriginNotAdmitted

A predecessor notification originated from a peer without an admitted connection.

Fields

§origin: Did

Authenticated origin that has no admitted connection generation.

§

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

§peer: Did

Peer whose scheduler is at capacity.

§capacity: usize

Maximum transfers admitted across all scheduler states.

§

OutboundTransferMemoryCapacityExceeded

The outbound scheduler cannot retain another payload within its byte budget.

Fields

§peer: Did

Peer whose scheduler would retain the payload.

§requested_bytes: usize

Bytes the transfer needs to retain.

§capacity_bytes: usize

Total byte capacity of the exhausted budget.

§

OutboundTransferAdmissionTimeout

A detached send could not obtain bounded scheduler capacity in time.

Fields

§peer: Did

Peer whose scheduler capacity remained exhausted.

§timeout_ms: u128

Admission deadline in milliseconds.

§

OutboundFirstFrameAdmissionTimeout

A detached transfer did not admit its first frame before its deadline.

Fields

§peer: Did

Peer whose scheduler lane did not admit the first frame.

§timeout_ms: u128

First-frame admission deadline in milliseconds.

§

DetachedPayloadCleanupTimeout

A detached transfer did not stop within its post-deadline cleanup grace.

Fields

§peer: Did

Peer whose exact connection generation was made send-terminal.

§timeout_ms: u128

Cleanup grace in milliseconds.

§

OutboundSchedulerRuntimeUnavailable

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.

Fields

§capacity: usize

Maximum queued and executing inbound messages.

§

InboundMailboxMemoryCapacityExceeded

The inbound actor cannot retain another message within its byte budget.

Fields

§requested_bytes: usize

Bytes retained by the decoded message and its handler representation.

§capacity_bytes: usize

Total mailbox byte capacity.

§

InboundPeerCapacityExceeded

One peer has exhausted its inbound message count allowance.

Fields

§peer: Option<Did>

Peer associated with the inbound connection, when its DID parsed successfully.

§capacity: usize

Maximum queued and executing messages retained for one peer.

§

InboundPeerMemoryCapacityExceeded

One peer has exhausted its inbound retained-memory allowance.

Fields

§peer: Option<Did>

Peer associated with the inbound connection, when its DID parsed successfully.

§requested_bytes: usize

Bytes requested by the inbound message.

§capacity_bytes: usize

Retained byte capacity available to one peer.

§

InboundMailboxClosed

The connection’s inbound mailbox actor is unavailable.

§

InboundMailboxRuntimeUnavailable

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: CallbackError

Original application validation error.

§

InboundValidationTimeout

An application validation callback did not complete within its deadline.

Fields

§peer: Option<Did>

Peer associated with the inbound connection, when its DID parsed successfully.

§timeout_ms: u128

Callback deadline in milliseconds.

§

InboundCallbackFailed

An application callback failed after core inbound handling.

Fields

§source: CallbackError

Original application callback error.

§

InboundProcessingTimeout

Inbound handling and its application callback did not complete within the deadline.

Fields

§peer: Option<Did>

Peer associated with the inbound connection, when its DID parsed successfully.

§timeout_ms: u128

Processing deadline in milliseconds.

§

InboundTimerUnavailable

The browser runtime could not schedule an inbound deadline timer.

Fields

§peer: Option<Did>

Peer associated with the inbound connection, when its DID parsed successfully.

§operation: &'static str

Inbound phase whose deadline could not be scheduled.

§

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}

Fields

§index: usize

Requested successor index.

§len: usize

Current successor sequence length.

§

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: WebrtcConnectionState

Observed WebRTC peer-connection state.

§data_channel_open: bool

Whether every transport data channel reported open.

§

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

§peer: Did

Peer whose data-channel send queue did not accept the bytes.

§timeout_ms: u128

Timeout budget in milliseconds.

§bytes: usize

Serialized bytes that were waiting to be accepted.

§context: &'static str

Send context used for diagnostics.

§

DataChannelSendCompletionTimeout

Timed out after the backend crossed its final cancellable send boundary.

Fields

§peer: Did

Peer whose irrevocable backend send did not complete.

§timeout_ms: u128

Completion timeout budget in milliseconds.

§bytes: usize

Number of bytes owned by the backend send.

§context: &'static str

Scheduler phase that issued the send.

§

DataChannelDeliveryTimeout

Timed out while waiting for accepted data-channel bytes to leave the local buffer.

Fields

§peer: Did

Peer whose accepted bytes did not leave the local send buffer.

§timeout_ms: u128

Delivery timeout budget in milliseconds.

§context: &'static str

Send context used for diagnostics.

§

TrackedPayloadCleanupTimeout

A tracked transfer did not stop within its post-deadline cleanup grace.

Fields

§peer: Did

Peer whose exact connection generation was made send-terminal.

§timeout_ms: u128

Cleanup grace in milliseconds.

§

SessionExpired

Session is expired

§

Transport(Error)

Transport error: {0}

§

JsError(String)

External Javascript error: {0}

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FromHexError> for Error

Source§

fn from(source: FromHexError) -> Self

Converts to this type from the input type.
Source§

impl From<FromUtf8Error> for Error

Source§

fn from(source: FromUtf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<ParseError> for Error

Source§

fn from(source: ParseError) -> Self

Converts to this type from the input type.
Source§

impl From<TryFromSliceError> for Error

Source§

fn from(source: TryFromSliceError) -> Self

Converts to this type from the input type.

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToSmolStr for T
where T: Display + ?Sized,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more