pub enum DebugSymbols {
    Unloaded(WeakFileRef),
    Loaded(DebugSections),
}
Expand description

An enum describing the possible forms of debug information for a crate.

Variants§

§

Unloaded(WeakFileRef)

Debug information that hasn’t yet been parsed from the given file. We use a weak reference to the file because it’s not mandatory to have debug symbols.

§

Loaded(DebugSections)

The debug information has already been parsed from the file

Implementations§

Loads the debug symbols from the enclosed weak file reference that correspond to the given LoadedCrate and using symbols from the given CrateNamespace.

If these DebugSymbols are already loaded, this is a no-op and simply returns those loaded DebugSections.

A convenience method for accessing the already-loaded DebugSections within. Returns None if the symbols are not currently loaded.

Unloads these DebugSymbols, returning the enclosed DebugSections if they were already loaded. If not, this is a no-op and returns None.

This is useful to free the large memory regions needed for debug information, and also to release dependencies on other crates’ sections.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.