Skip to content

[rustdoc-json] absolute position of item is hard to get #93524

Open
@Urgau

Description

@Urgau

Problem:
Currently, the only way to accurately (see #93522 for reason why paths is not accurate) know the position of an item is to traverse all modules and items down to the item that we want, this is costly and inefficient especially for Ids that comes from the documentation (ie intra-doc-links) because they can link to outside.

Solution:
Have a parent_id field that link the current Item to it's direct parent. This would mean that we could go from down (item) to upper (module) in a straightforward way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-jsonArea: Rustdoc JSON backendC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions