Skip to content

Is there a way to construct mutually recursive structs? #26

@teymour-aldridge

Description

@teymour-aldridge

e.g. trying to derive DefaultMutator fails (not unexpectedly) on the following structs.

struct MutuallyRecursiveA {
  b: Vec<MutuallyRecursiveB>,
  data: Vec<u64>
}

struct MutuallyRecursiveB {
  a: Option<A>,
  data: bool
}

I tried using make_mutator, but I couldn't get the recursion to work.

Is this possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions