|
|
|
|
|
by tekne
186 days ago
|
|
I mean, if you return an immutable reference, the owner in fact cannot mutate it until that reference is dropped. If you in fact return e.g. an Rc::new(thing) or Arc::new(thing), that's forever (though of course you can unwrap the last reference!) |
|
Might be worth noting that "dropped" in this context doesn't necessarily correspond to the reference going out of scope: