Let's say I have a struct
struct Foo<'a> {
a: Boo,
b: &'a Boo,
}
How do I make it work?
Let's say I have a struct
struct Foo<'a> {
a: Boo,
b: &'a Boo,
}
How do I make it work?
If you must [1], then it can be done with the help of crates like this: self_referencing in ouroboros - Rust
though often its also fairly straightforward to avoid the need for self-references in the first place, in wich case doing so might be the preferred and more straightforward approach âŠī¸
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.