Lifetimes / Return references
📄️ Overview
References in arguments (such as fn f(a &mut Bar)) is already supported long ago,
📄️ Types with lifetimes
We can have function like fn f(foo: &'a Foo) -> Bar,
📄️ Return references
Suppose we have the following function:
📄️ Multi borrows
In this page, we discuss a limitation of types with lifetimes because of combination of Rust and Dart.
📄️ Alternatives
In addition to directly using the feature, sometimes the following alternative approaches are also helpful.