Enum tor_dirmgr::Error
source · [−]#[non_exhaustive]
pub enum Error {
Show 26 variants
Unwanted(&'static str),
NetDirOlder,
NoDownloadSupport,
CacheCorruption(&'static str),
SqliteError(Arc<Error>),
UnrecognizedSchema,
DirectoryNotPresent,
UnrecognizedAuthorities,
ManagerDropped,
CantAdvanceState,
StorageError(String),
ConsensusDiffError(Error),
BadUtf8FromDirectory(FromUtf8Error),
BadUtf8InCache(Utf8Error),
BadHexInCache(FromHexError),
NetDocError {
source: DocSource,
cause: Error,
},
ConsensusInvalid {
source: DocSource,
cause: Error,
},
UntimelyObject(TimeValidityError),
DirClientError(Error),
SignatureError(Arc<Error>),
IOError(Arc<Error>),
OfflineMode,
CachePermissions(Error),
Spawn {
spawning: &'static str,
cause: Arc<SpawnError>,
},
ExternalDirProvider {
cause: Arc<dyn Error + Send + Sync + 'static>,
kind: ErrorKind,
},
Bug(Bug),
}
Expand description
An error originated by the directory manager code
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Unwanted(&'static str)
We received a document we didn’t want at all.
NetDirOlder
The NetDir we downloaded is older than the one we already have.
NoDownloadSupport
This DirMgr doesn’t support downloads.
CacheCorruption(&'static str)
We couldn’t read something from disk that we should have been able to read.
SqliteError(Arc<Error>)
rusqlite gave us an error.
UnrecognizedSchema
A schema version that says we can’t read it.
DirectoryNotPresent
User requested an operation that required a usable bootstrapped directory, but we didn’t have one.
UnrecognizedAuthorities
A consensus document is signed by an unrecognized authority set.
ManagerDropped
A directory manager has been dropped; background tasks can exit too.
CantAdvanceState
We made a bunch of attempts, but weren’t unable to advance the state of a download.
StorageError(String)
Blob storage error
ConsensusDiffError(Error)
An error given by the consensus diff crate.
BadUtf8FromDirectory(FromUtf8Error)
Invalid UTF8 in directory response.
BadUtf8InCache(Utf8Error)
Invalid UTF8 from our cache.
BadHexInCache(FromHexError)
Invalid hexadecimal value in the cache.
NetDocError
An error given by the network document crate.
ConsensusInvalid
An error indicating that the consensus could not be validated.
This kind of error is only returned during the certificate fetching state; it indicates that a consensus which previously seemed to be plausible has turned out to be wrong after we got the certificates.
UntimelyObject(TimeValidityError)
An error caused by an expired or not-yet-valid object.
DirClientError(Error)
An error given by dirclient
SignatureError(Arc<Error>)
An error given by the checkable crate.
IOError(Arc<Error>)
An IO error occurred while manipulating storage on disk.
OfflineMode
An attempt was made to bootstrap a DirMgr
created in offline mode.
CachePermissions(Error)
A problem with file permissions on our cache directory.
Spawn
Fields
spawning: &'static str
What we were trying to spawn
cause: Arc<SpawnError>
What happened when we tried to spawn it
Unable to spawn task
ExternalDirProvider
Other error from an external directory provider
Bug(Bug)
A programming problem, either in our code or the code calling it.
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<TimeValidityError> for Error
impl From<TimeValidityError> for Error
sourcefn from(source: TimeValidityError) -> Self
fn from(source: TimeValidityError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
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. Read more
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. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more