pub struct Definitions {
    table: DefPathTable,
    next_disambiguator: FxHashMap<(LocalDefId, DefPathData), u32>,
    stable_crate_id: StableCrateId,
}
Expand description

The definition table containing node definitions. It holds the DefPathTable for LocalDefIds/DefPaths. It also stores mappings to convert LocalDefIds to/from HirIds.

Fields

table: DefPathTablenext_disambiguator: FxHashMap<(LocalDefId, DefPathData), u32>stable_crate_id: StableCrateId

The StableCrateId of the local crate.

Implementations

Gets the number of definitions.

Returns the path from the crate root to index. The root nodes are not included in the path (i.e., this will be an empty vector for the crate root). For an inlined item, this will be the path of the item in the external crate (but the path will begin with the path to the external crate).

Adds a root definition (no parent) and a few other reserved definitions.

Adds a definition with a parent definition.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 104 bytes