Skip to content

Circular references (bidirectional linked lists, etc) #197

Open
@vchekan

Description

@vchekan

Cyclic references in Rust are impossible in straightforward way and workarounds are required.

  1. Describe reason why it is so.
  2. Show different examples when cyclic reffereneces are present
  3. Describe solutions (Rc, Vec with storing indexes, Slotmap)

While problem with linked list is simple to grasp, sometimes when the proble manifest itself on architecture level, it is more difficult to realize that you are dealing with cyclic references. Perhaps this presentation can be an example for architecture that can benefit: https://www.youtube.com/watch?v=P9u8x13W7UE

Relevant reddit thread: https://www.reddit.com/r/rust/comments/kq6lt2/slotmap_10_has_been_released_copy_restriction/

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-patternArea: Content about PatternsC-additionCategory: Adding new content, something that didn't exist in the repository before

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions