#[non_exhaustive]pub enum Error {
Corruption(KeystoreCorruptionError),
Keystore(Arc<dyn KeystoreError>),
KeyAlreadyExists,
KeyForge(Error),
InvalidCert(InvalidCertError),
Bug(Bug),
}
Expand description
An Error type for this crate.
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.
Corruption(KeystoreCorruptionError)
Detected keustore corruption.
Keystore(Arc<dyn KeystoreError>)
An opaque error returned by a Keystore
.
KeyAlreadyExists
An error returned when the KeyMgr
is asked to generate a key that already exists.
Note that because there is no locking of the keystore, this situation is not reliably detected in the presence of concurrent tasks trying to generate the same key.
So this error is provided to help the human user, but mustn’t be relied on for correctness.
KeyForge(Error)
Error coming from the tor-key-forgecrate
InvalidCert(InvalidCertError)
An error caused by an invalid certificate.
Bug(Bug)
An internal error.
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Arc<dyn KeystoreError>> for Error
impl From<Arc<dyn KeystoreError>> for Error
Source§fn from(source: Arc<dyn KeystoreError>) -> Self
fn from(source: Arc<dyn KeystoreError>) -> Self
Converts to this type from the input type.
Source§impl From<ArtiEphemeralKeystoreError> for Error
Available on crate features ephemeral-keystore
and keymgr
only.
impl From<ArtiEphemeralKeystoreError> for Error
Available on crate features
ephemeral-keystore
and keymgr
only.Source§fn from(e: ArtiEphemeralKeystoreError) -> Self
fn from(e: ArtiEphemeralKeystoreError) -> Self
Converts to this type from the input type.
Source§impl From<ArtiNativeKeystoreError> for Error
Available on crate feature keymgr
only.
impl From<ArtiNativeKeystoreError> for Error
Available on crate feature
keymgr
only.Source§fn from(e: ArtiNativeKeystoreError) -> Self
fn from(e: ArtiNativeKeystoreError) -> Self
Converts to this type from the input type.
Source§impl From<CTorKeystoreError> for Error
Available on crate features ctor-keystore
and keymgr
only.
impl From<CTorKeystoreError> for Error
Available on crate features
ctor-keystore
and keymgr
only.Source§fn from(e: CTorKeystoreError) -> Self
fn from(e: CTorKeystoreError) -> Self
Converts to this type from the input type.
Source§impl From<InvalidCertError> for Error
impl From<InvalidCertError> for Error
Source§fn from(source: InvalidCertError) -> Self
fn from(source: InvalidCertError) -> Self
Converts to this type from the input type.
Source§impl From<KeystoreCorruptionError> for Error
impl From<KeystoreCorruptionError> for Error
Source§fn from(source: KeystoreCorruptionError) -> Self
fn from(source: KeystoreCorruptionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
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>
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)
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)
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
impl<T> DowncastSync for T
§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>
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 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>
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§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>
Convert
self
into a Slug
, if it has the right syntax