pub enum SymbolError {
    NotFound,
    MissingDebugFileOrId,
    LoadError(Error),
    ParseError(&'static str, u64),
}
Expand description

Possible results of locating symbols for a module.

Because symbols may be found from different sources, symbol providers are usually configured to “cascade” into the next one whenever they report NotFound.

Cascading currently assumes that if any provider finds symbols for a module, all other providers will find the same symbols (if any). Therefore cascading will not be applied if a LoadError or ParseError occurs (because presumably, all the other sources will also fail to load/parse.)

In theory we could do some interesting things where we attempt to be more robust and actually merge together the symbols from multiple sources, but that would make it difficult to cache symbol files, and would rarely actually improve results.

Since symbol files can be on the order of a gigabyte(!) and downloaded from the network, aggressive caching is pretty important. The current approach is a nice balance of simple and effective.

Variants§

§

NotFound

Symbol file could not be found.

In this case other symbol providers may still be able to find it!

§

MissingDebugFileOrId

The module was lacking either the debug file or debug id, as such the path of the symbol could not be generated.

§

LoadError(Error)

Symbol file could not be loaded into memory.

§

ParseError(&'static str, u64)

Symbol file was too corrupt to be parsed at all.

Because symbol files are pretty modular, many corruptions/ambiguities can be either repaired or discarded at a fairly granular level (e.g. a bad STACK WIN line can be discarded without affecting anything else). But sometimes we can’t make any sense of the symbol file, and you find yourself here.

Trait Implementations§

source§

impl Debug for SymbolError

source§

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

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

impl Display for SymbolError

source§

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

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

impl Error for SymbolError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

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 SymbolError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl PartialEq for SymbolError

source§

fn eq(&self, other: &SymbolError) -> 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.

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

source§

default 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>,

§

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