#[non_exhaustive]
pub enum ErrorKind {
Show 60 variants TorAccessFailed, BootstrapRequired, DirectoryExpired, PersistentStateAccessFailed, LocalResourceAlreadyInUse, FsPermissions, PersistentStateCorrupted, CacheCorrupted, CacheAccessFailed, KeystoreCorrupted, KeystoreAccessFailed, ReactorShuttingDown, ArtiShuttingDown, RemoteNetworkTimeout, InvalidConfig, InvalidConfigTransition, NoHomeDirectory, NotImplemented, FeatureDisabled, LocalProtocolViolation, TorProtocolViolation, LocalNetworkError, ExternalToolFailed, RelayIdMismatch, CircuitCollapse, TorNetworkTimeout, TorDirectoryError, RemoteStreamClosed, RemoteStreamReset, RemoteStreamError, RemoteConnectionRefused, ExitPolicyRejected, ExitTimeout, RemoteNetworkFailed, RemoteHostNotFound, OnionServiceNotFound, OnionServiceNotRunning, OnionServiceProtocolViolation, OnionServiceConnectionFailed, OnionServiceMissingClientAuth, OnionServiceWrongClientAuth, OnionServiceAddressInvalid, RemoteHostResolutionFailed, RemoteProtocolViolation, RelayTooBusy, InvalidStreamTarget, ForbiddenStreamTarget, TransientFailure, BadApiUsage, CircuitRefused, NoPath, NoExit, TorDirectoryUnusable, ClockSkew, RpcInvalidRequest, RpcMethodNotFound, RpcInvalidMethodParameters, RpcObjectNotFound, Internal, Other,
}
Expand description

Classification of an error arising from Arti’s Tor operations

This ErrorKind should suffice for programmatic handling by most applications embedding Arti: get the kind via HasKind::kind and compare it to the expected value(s) with equality or by matching.

When forwarding or reporting errors, use the whole error (e.g., TorError), not just the kind: the error itself will contain more detail and context which is useful to humans.

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

TorAccessFailed

Error connecting to the Tor network

Perhaps the local network is not working, or perhaps the chosen relay or bridge is not working properly. Not used for errors that occur within the Tor network, or accessing the public internet on the far side of Tor.

§

BootstrapRequired

An attempt was made to use a Tor client for something without bootstrapping it first.

§

DirectoryExpired

Our network directory has expired before we were able to replace it.

This kind of error can indicate one of several possible problems:

  • It can occur if the client used to be on the network, but has been unable to make directory connections for a while.
  • It can occur if the client has been suspended or sleeping for a long time, and has suddenly woken up without having a chance to replace its network directory.
  • It can happen if the client has a sudden clock jump.

Often, retrying after a minute or so will resolve this issue.

Future versions of Arti may resolve this situation automatically without caller intervention, possibly depending on preferences and API usage, in which case this kind of error will never occur.

§

PersistentStateAccessFailed

IO error accessing local persistent state

For example, the disk might be full, or there may be a permissions problem. Usually the source will be std::io::Error.

Note that this kind of error only applies to problems in your state_dir: problems with your cache are another kind.

§

LocalResourceAlreadyInUse

We could not start up because a local resource is already being used by someone else

Local resources include things like listening ports and state lockfiles. (We don’t use this error for “out of disk space” and the like.)

This can occur when another process (or another caller of Arti APIs) is already running a facility that overlaps with the one being requested.

For example, running multiple processes each containing instances of the same hidden service, using the same state directories etc., is not supported.

Another example: if Arti is configured to listen on a particular port, but another process on the system is already listening there, the resulting error has kind LocalResourceAlreadyInUse.

§

FsPermissions

We encountered a problem with filesystem permissions.

This is likeliest to be caused by permissions on a file or directory being too permissive; the next likeliest cause is that we were unable to check the permissions on the file or directory, or on one of its ancestors.

§

PersistentStateCorrupted

Tor client’s persistent state has been corrupted

This could be because of a bug in the Tor code, or because something else has been messing with the data.

This might also occur if the Tor code was upgraded and the new Tor is not compatible.

Note that this kind of error only applies to problems in your state_dir: problems with your cache are another kind.

§

CacheCorrupted

Tor client’s cache has been corrupted.

This could be because of a bug in the Tor code, or because something else has been messing with the data.

This might also occur if the Tor code was upgraded and the new Tor is not compatible.

Note that this kind of error only applies to problems in your cache_dir: problems with your persistent state are another kind.

§

CacheAccessFailed

We had a problem reading or writing to our data cache.

This may be a disk error, a file permission error, or similar.

Note that this kind of error only applies to problems in your cache_dir: problems with your persistent state are another kind.

§

KeystoreCorrupted

The keystore has been corrupted

This could be because of a bug in the Tor code, or because something else has been messing with the data.

Note that this kind of error only applies to problems in your keystore_dir: problems with your cache or persistent state are another kind.

§

KeystoreAccessFailed

IO error accessing keystore

For example, the disk might be full, or there may be a permissions problem. The source is typically an std::io::Error.

Note that this kind of error only applies to problems in your keystore_dir: problems with your cache or persistent state are another kind.

§

ReactorShuttingDown

Tor client’s Rust async reactor is shutting down.

This likely indicates that the reactor has encountered a fatal error, or has been told to do a clean shutdown, and it isn’t possible to spawn new tasks.

§

ArtiShuttingDown

Tor client is shutting down.

This likely indicates that the last handle to the TorClient has been dropped, and is preventing other operations from completing.

§

RemoteNetworkTimeout

An operation failed because we waited too long for an exit to do something.

This error can happen if the host you’re trying to connect to isn’t responding to traffic. It can also happen if an exit, or hidden service, is overloaded, and unable to answer your replies in a timely manner.

And it might simply mean that the Tor network itself (including possibly relays, or hidden service introduction or rendezvous points) is not working properly

In either case, trying later, or on a different circuit, might help.

§

InvalidConfig

One or more configuration values were invalid or incompatible.

This kind of error can happen if the user provides an invalid or badly formatted configuration file, if some of the options in that file are out of their ranges or unparsable, or if the options are not all compatible with one another. It can also happen if configuration options provided via APIs are out of range.

If this occurs because of user configuration, it’s probably best to tell the user about the error. If it occurs because of API usage, it’s probably best to fix the code that causes the error.

§

InvalidConfigTransition

Tried to change the configuration of a running Arti service in a way that isn’t supported.

This kind of error can happen when you call a reconfigure() method on a service (or part of a service) and the new configuration is not compatible with the previous configuration.

The only available remedy is to tear down the service and make a fresh one (for example, by making a new TorClient).

§

NoHomeDirectory

Tried to look up a directory depending on the user’s home directory, but the user’s home directory isn’t set or can’t be found.

This kind of error can also occur if we’re running in an environment where users don’t have home directories.

To resolve this kind of error, either move to an OS with home directories, or make sure that all paths in the configuration are set explicitly, and do not depend on any path variables.

§

NotImplemented

A requested operation was not implemented by Arti.

This kind of error can happen when requesting a piece of protocol functionality that has not (yet) been implemented in the Arti project.

If it happens as a result of a user activity, it’s fine to ignore, log, or report the error. If it happens as a result of direct API usage, it may indicate that you’re using something that isn’t implemented yet.

This kind can relate both to operations which we plan to implement, and to operations which we do not. It does not relate to facilities which are disabled (e.g. at build time) or harmful.

It can refer to facilities which were once implemented in Tor or Arti but for which support has been removed.

§

FeatureDisabled

A feature was requested which has been disabled in this build of Arti.

This kind of error happens when the running Arti was built without the appropriate feature (usually, cargo feature) enabled.

This might indicate that the overall running system has been mis-configured at build-time. Alternatively, it can occur if the running system is deliberately stripped down, in which case it might be reasonable to simply report this error to a user.

§

LocalProtocolViolation

Someone or something local violated a network protocol.

This kind of error can happen when a local program accessing us over some other protocol violates the protocol’s requirements.

This usually indicates a programming error: either in that program’s implementation of the protocol, or in ours. In any case, the problem is with software on the local system (or otherwise sharing a Tor client).

It might also occur if the local system has an incompatible combination of tools that we can’t talk with.

This error kind does not include situations that are better explained by a local program simply crashing or terminating unexpectedly.

§

TorProtocolViolation

Someone or something on the Tor network violated the Tor protocols.

This kind of error can happen when a remote Tor instance behaves in a way we don’t expect.

It usually indicates a programming error: either in their implementation of the protocol, or in ours. It can also indicate an attempted attack, though that can be hard to diagnose.

§

LocalNetworkError

Something went wrong with a network connection or the local network.

This kind of error is usually safe to retry, and shouldn’t typically be seen. By the time it reaches the caller, a more specific error type should typically be available.

§

ExternalToolFailed

A problem occurred when launching or communicating with an external process running on this computer.

§

RelayIdMismatch

A relay had an identity other than the one we expected.

This could indicate a MITM attack, but more likely indicates that the relay has changed its identity but the new identity hasn’t propagated through the directory system yet.

§

CircuitCollapse

An attempt to do something remotely through the Tor network failed because the circuit it was using shut down before the operation could finish.

§

TorNetworkTimeout

An operation timed out on the tor network.

This may indicate a network problem, either with the local network environment’s ability to contact the Tor network, or with the Tor network itself.

§

TorDirectoryError

We tried but failed to download a piece of directory information.

This is a lower-level kind of error; in general it should be retried before the user can see it. In the future it is likely to be split into several other kinds.

§

RemoteStreamClosed

An operation finished because a remote stream was closed successfully.

This can indicate that the target server closed the TCP connection, or that the exit told us that it closed the TCP connection. Callers should generally treat this like a closed TCP connection.

§

RemoteStreamReset

An operation finished because the remote stream was closed abruptly.

This kind of error is analogous to an ECONNRESET error; it indicates that the exit reported that the stream was terminated without a clean TCP shutdown.

For most purposes, it’s fine to treat this kind of error the same as regular unexpected close.

§

RemoteStreamError

An operation finished because a remote stream was closed unsuccessfully.

This indicates that the exit reported some error message for the stream.

We only provide this error kind when no more specific kind is available.

§

RemoteConnectionRefused

A stream failed, and the exit reports that the remote host refused the connection.

This is analogous to an ECONNREFUSED error.

§

ExitPolicyRejected

A stream was rejected by the exit relay because of that relay’s exit policy.

(In Tor, exits have a set of policies declaring which addresses and ports they’re willing to connect to. Clients download only summaries of these policies, so it’s possible to be surprised by an exit’s refusal to connect somewhere.)

§

ExitTimeout

An operation failed, and the exit reported that it waited too long for the operation to finish.

This kind of error is distinct from RemoteNetworkTimeout, which means that our own timeout threshold was violated.

§

RemoteNetworkFailed

An operation failed, and the exit reported a network failure of some kind.

This kind of error can occur for a number of reasons. If it happens when trying to open a stream, it usually indicates a problem connecting, such as an ENOROUTE error.

§

RemoteHostNotFound

An operation finished because an exit failed to look up a hostname.

Unfortunately, the Tor protocol does not distinguish failure of DNS services (“we couldn’t find out if this host exists and what its name is”) from confirmed denials (“this is not a hostname”). So this kind conflates both those sorts of error.

Trying at another exit might succeed, or the address might truly be unresolvable.

§

OnionServiceNotFound

The target hidden service (.onion service) was not found in the directory

We successfully connected to at least one directory server, but it didn’t have a record of the hidden service.

This probably means that the hidden service is not running, or does not exist. (It might mean that the directory servers are faulty, and that the hidden service was unable to publish its descriptor.)

§

OnionServiceNotRunning

The target hidden service (.onion service) seems to be down

We successfully obtained a hidden service descriptor for the service, so we know it is supposed to exist, but we weren’t able to communicate with it via any of its introduction points.

This probably means that the hidden service is not running. (It might mean that the introduction point relays are faulty.)

§

OnionServiceProtocolViolation

Protocol trouble involving the target hidden service (.onion service)

Something unexpected happened when trying to connect to the selected hidden service. It seems to have been due to the hidden service violating the Tor protocols somehow.

§

OnionServiceConnectionFailed

The target hidden service (.onion service) is running but we couldn’t connect to it, and we aren’t sure whose fault that is

This might be due to malfunction on the part of the service, or a relay being used as an introduction point or relay, or failure of the underlying Tor network.

§

OnionServiceMissingClientAuth

We tried to connect to an onion service without authentication, but it apparently requires authentication.

§

OnionServiceWrongClientAuth

We tried to connect to an onion service that requires authentication, and ours is wrong.

This likely means that we need to use a different key for talking to this onion service, or that it has revoked our permissions to reach it.

§

OnionServiceAddressInvalid

We tried to parse a .onion address, and found that it was not valid.

This likely means that it was corrupted somewhere along its way from its origin to our API surface. It may be the wrong length, have invalid characters, have an invalid version number, or have an invalid checksum.

§

RemoteHostResolutionFailed

An resolve operation finished with an error.

Contrary to RemoteHostNotFound, this can’t mean “this is not a hostname”. This error should be retried.

§

RemoteProtocolViolation

Trouble involving a protocol we’re using with a peer on the far side of the Tor network

We were using a higher-layer protocol over a Tor connection, and something went wrong. This might be an error reported by the remote host within that higher protocol, or a problem detected locally but relating to that higher protocol.

The nature of the problem can vary: examples could include: failure to agree suitable parameters (incompatibility); authentication problems (eg, TLS certificate trouble); protocol violation by the peer; peer refusing to provide service; etc.

§

RelayTooBusy

An operation failed, and the relay in question reported that it’s too busy to answer our request.

§

InvalidStreamTarget

We were asked to make an anonymous connection to a malformed address.

This is probably because of a bad input from a user.

§

ForbiddenStreamTarget

We were asked to make an anonymous connection to a locally disabled address.

For example, this kind of error can happen when try to connect to (e.g.) 127.0.0.1 using a client that isn’t configured with allow_local_addrs.

Usually this means that you intended to reject the request as nonsensical; but if you didn’t, it probably means you should change your configuration to allow what you want.

§

TransientFailure

An operation failed in a transient way.

This kind of error indicates that some kind of operation failed in a way where retrying it again could likely have made it work.

You should not generally see this kind of error returned directly to you for high-level functions. It should only be returned from lower-level crates that do not automatically retry these failures.

§

BadApiUsage

Bug, for example calling a function with an invalid argument.

This kind of error is usually a programming mistake on the caller’s part. This is usually a bug in code calling Arti, but it might be a bug in Arti itself.

§

CircuitRefused

We asked a relay to create or extend a circuit, and it declined.

Either it gave an error message indicating that it refused to perform the request, or the protocol gives it no room to explain what happened.

This error is returned by higher-level functions only if it is the most informative error after appropriate retries etc.

§

NoPath

We were unable to construct a path through the Tor network.

Usually this indicates that there are too many user-supplied restrictions for us to comply with.

On test networks, it likely indicates that there aren’t enough relays, or that there aren’t enough relays in distinct families.

§

NoExit

We were unable to find an exit relay with a certain set of desired properties.

Usually this indicates that there were too many user-supplied restrictions on the exit for us to comply with, or that there was no exit on the network supporting all of the ports that the user asked for.

§

TorDirectoryUnusable

The Tor consensus directory is broken or unsuitable

This could occur when running very old software against the current Tor network, so that the newer network is incompatible.

It might also mean a catastrophic failure of the Tor network, or that a deficient test network is in use.

Currently some instances of this kind of problem are reported as NoPath or NoExit.

§

ClockSkew

An operation failed because of possible clock skew.

The broken clock may be ours, or it may belong to another party on the network. It’s also possible that somebody else is lying about the time, caching documents for far too long, or something like that.

§

RpcInvalidRequest

Available on crate feature rpc only.

An RPC operation failed because a request could not be parsed or was otherwise invalid.

§

RpcMethodNotFound

Available on crate feature rpc only.

An RPC operation failed because a method type could not be found, or is not available on a given object.

§

RpcInvalidMethodParameters

Available on crate feature rpc only.

An RPC operation failed because the method type’s parameters were not correct for it.

§

RpcObjectNotFound

Available on crate feature rpc only.

An RPC operation failed because a given object could not be found.

§

Internal

Internal error (bug) in Arti.

A supposedly impossible problem has arisen. This indicates a bug in Arti; if the Arti version is relatively recent, please report the bug on our bug tracker.

§

Other

Unclassified error

Some other error occurred, which does not fit into any of the other kinds.

This kind is provided for use by external code hooking into or replacing parts of Arti. It is never returned by the code in Arti (arti-* and tor-* crates).

Implementations§

source§

impl ErrorKind

source

pub fn is_always_a_warning(&self) -> bool

Return true if this ErrorKind should always be logged as a warning (or more severe).

Trait Implementations§

source§

impl Clone for ErrorKind

source§

fn clone(&self) -> ErrorKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ErrorKind

source§

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

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

impl Display for ErrorKind

source§

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

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

impl PartialEq for ErrorKind

source§

fn eq(&self, other: &ErrorKind) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for ErrorKind

source§

impl Eq for ErrorKind

source§

impl StructuralPartialEq for ErrorKind

Auto Trait Implementations§

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

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> DynClone for T
where T: Clone,

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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.

§

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

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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<T> TryIntoSlug for T
where T: ToString + ?Sized,

source§

fn try_into_slug(&self) -> Result<Slug, BadSlug>

Convert self into a Slug, if it has the right syntax
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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