#[non_exhaustive]pub enum ErrorDetail {
Show 35 variants
MemquotaSetup(StartupError),
MemquotaDuringStartup(Error),
ChanMgrSetup(Error),
GuardMgrSetup(GuardMgrError),
VanguardMgrSetup(VanguardMgrError),
CircMgrSetup(Error),
BridgeDescMgrSetup(StartupError),
DirMgrSetup(Error),
StateMgrSetup(Error),
HsClientConnectorSetup(StartupError),
ObtainExitCircuit {
exit_ports: Sensitive<TargetPorts>,
cause: Error,
},
ObtainHsCircuit {
hsid: Redacted<HsId>,
cause: ConnError,
},
DirMgrBootstrap(Error),
StreamFailed {
kind: &'static str,
cause: Error,
},
StateAccess(Error),
ExitTimeout,
OnionAddressNotSupported,
OnionAddressDisabled,
OnionAddressResolveRequest,
Address(TorAddrError),
InvalidHostname,
LocalAddress,
Configuration(ConfigBuildError),
Reconfigure(ReconfigureError),
PluggableTransport(PtError),
FsMistrust(Error),
Spawn {
spawning: &'static str,
cause: Arc<SpawnError>,
},
BootstrapRequired {
action: &'static str,
},
NoDir {
error: Error,
action: &'static str,
},
Keystore(Error),
KeystoreRequired {
action: &'static str,
},
BadClientSpecifier(ArtiPathSyntaxError),
BadOnionAddress(HsIdParseError),
LaunchOnionService(StartupError),
Bug(Bug),
}
error_detail
only.Expand description
Represents errors that can occur while doing Tor operations.
This enumeration is the inner view of a
arti_client::Error
: we don’t expose it unless the
error_detail
feature is enabled.
The details of this enumeration are not stable: using the error_detail
feature will void your semver guarantee.
Instead of looking at the type, you should try to use the
kind
trait method to distinguish among
different kinds of Error
. If that doesn’t provide enough information
for your use case, please let us know.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MemquotaSetup(StartupError)
Error setting up the memory quota tracker
MemquotaDuringStartup(Error)
Memory quota error while starting up Arti
ChanMgrSetup(Error)
Error setting up the channel manager
GuardMgrSetup(GuardMgrError)
Error setting up the guard manager
VanguardMgrSetup(VanguardMgrError)
vanguards
and (crate features onion-service-client
or onion-service-service
) only.Error setting up the guard manager
CircMgrSetup(Error)
Error setting up the circuit manager
BridgeDescMgrSetup(StartupError)
bridge-client
only.Error setting up the bridge descriptor manager
DirMgrSetup(Error)
Error setting up the directory manager
StateMgrSetup(Error)
Error setting up the state manager.
HsClientConnectorSetup(StartupError)
onion-service-client
only.Error setting up the hidden service client connector.
ObtainExitCircuit
Failed to obtain exit circuit
Fields
exit_ports: Sensitive<TargetPorts>
The ports that we wanted a circuit for.
ObtainHsCircuit
onion-service-client
only.Failed to obtain hidden service circuit
Fields
DirMgrBootstrap(Error)
Directory manager was unable to bootstrap a working directory.
StreamFailed
A protocol error while launching a stream
Fields
StateAccess(Error)
An error while interfacing with the persistent data layer.
ExitTimeout
We asked an exit to do something, and waited too long for an answer.
OnionAddressNotSupported
Onion services are not compiled in, but we were asked to connect to one.
OnionAddressDisabled
onion-service-client
only.Onion services are not enabled, but we were asked to connect to one.
This error occurs when Arti is built with onion service support, but onion services are disabled via our stream preferences.
To enable onion services, set allow_onion_addrs
to true
in the
address_filter
configuration section. Alternatively, set
connect_to_onion_services
in your StreamPrefs
object.
OnionAddressResolveRequest
Error when trying to find the IP address of a hidden service
Address(TorAddrError)
Unusable target address.
TorAddrError::InvalidHostname
should not appear here;
use ErrorDetail::InvalidHostname
instead.
InvalidHostname
Hostname not valid.
LocalAddress
Address was local, and we don’t permit connecting to those over Tor.
Configuration(ConfigBuildError)
Building configuration for the client failed.
Reconfigure(ReconfigureError)
Unable to change configuration.
PluggableTransport(PtError)
pt-client
only.Problem creating or launching a pluggable transport.
FsMistrust(Error)
We encountered a problem while inspecting or creating a directory.
Spawn
Unable to spawn task
Fields
BootstrapRequired
Attempted to use an unbootstrapped TorClient
for something that
requires bootstrapping to have completed.
NoDir
Attempted to use a TorClient
for something when it did not
have a valid directory.
Fields
Keystore(Error)
A key store access failed.
KeystoreRequired
Attempted to use a TorClient
for something that
requires the keystore to be enabled in the configuration.
BadClientSpecifier(ArtiPathSyntaxError)
Encountered a malformed client specifier.
BadOnionAddress(HsIdParseError)
onion-service-client
only.We tried to parse an onion address, but we found that it was invalid.
This error occurs if we are asked to connect to an invalid .onion address.
LaunchOnionService(StartupError)
onion-service-service
only.We were unable to launch an onion service, even though we we are configured to be able to do so.
Bug(Bug)
A programming problem, either in our code or the code calling it.
Implementations§
Source§impl ErrorDetail
impl ErrorDetail
Sourcepub(crate) fn from_spawn(spawning: &'static str, err: SpawnError) -> ErrorDetail
pub(crate) fn from_spawn(spawning: &'static str, err: SpawnError) -> ErrorDetail
Construct a new Error
from a SpawnError
.
Trait Implementations§
Source§impl Clone for ErrorDetail
impl Clone for ErrorDetail
Source§fn clone(&self) -> ErrorDetail
fn clone(&self) -> ErrorDetail
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ErrorDetail
impl Debug for ErrorDetail
Source§impl Display for ErrorDetail
impl Display for ErrorDetail
Source§impl Error for ErrorDetail
impl Error for ErrorDetail
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
Source§impl From<ArtiPathSyntaxError> for ErrorDetail
impl From<ArtiPathSyntaxError> for ErrorDetail
Source§fn from(source: ArtiPathSyntaxError) -> Self
fn from(source: ArtiPathSyntaxError) -> Self
Source§impl From<Bug> for ErrorDetail
impl From<Bug> for ErrorDetail
Source§impl From<ConfigBuildError> for ErrorDetail
impl From<ConfigBuildError> for ErrorDetail
Source§fn from(source: ConfigBuildError) -> Self
fn from(source: ConfigBuildError) -> Self
Source§impl From<Error> for ErrorDetail
impl From<Error> for ErrorDetail
Source§impl From<Error> for ErrorDetail
impl From<Error> for ErrorDetail
Source§impl From<Error> for ErrorDetail
impl From<Error> for ErrorDetail
Source§impl From<ErrorDetail> for Error
impl From<ErrorDetail> for Error
Source§fn from(detail: ErrorDetail) -> Error
fn from(detail: ErrorDetail) -> Error
Source§impl From<HsIdParseError> for ErrorDetail
impl From<HsIdParseError> for ErrorDetail
Source§fn from(source: HsIdParseError) -> Self
fn from(source: HsIdParseError) -> Self
Source§impl From<PtError> for ErrorDetail
impl From<PtError> for ErrorDetail
Source§impl From<ReconfigureError> for ErrorDetail
impl From<ReconfigureError> for ErrorDetail
Source§impl From<StartupError> for ErrorDetail
impl From<StartupError> for ErrorDetail
Source§impl From<StartupError> for ErrorDetail
impl From<StartupError> for ErrorDetail
Source§impl From<StartupError> for ErrorDetail
impl From<StartupError> for ErrorDetail
Source§fn from(source: StartupError) -> Self
fn from(source: StartupError) -> Self
Source§impl From<TorAddrError> for ErrorDetail
impl From<TorAddrError> for ErrorDetail
Source§fn from(e: TorAddrError) -> ErrorDetail
fn from(e: TorAddrError) -> ErrorDetail
Auto Trait Implementations§
impl Freeze for ErrorDetail
impl !RefUnwindSafe for ErrorDetail
impl Send for ErrorDetail
impl Sync for ErrorDetail
impl Unpin for ErrorDetail
impl !UnwindSafe for ErrorDetail
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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
impl<T> DowncastSync for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
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) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
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
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
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
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
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
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.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
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.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
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> TryIntoSlug for T
impl<T> TryIntoSlug for T
§fn try_into_slug(&self) -> Result<Slug, BadSlug>
fn try_into_slug(&self) -> Result<Slug, BadSlug>
self
into a Slug
, if it has the right syntax