Parameter modes
A mode sits between the parameter name and its type, and a non-default mode is written again at the call site. A reader of the call knows whether the binding survives it, and in what state, without opening the callee.
| Mode | Meaning | At the call |
|---|---|---|
let | borrowed, read-only (the default) | read(s) |
mutable | borrowed, may be mutated in place | write(mutable s) |
take | ownership moves to the callee | consume(take s) |
init | callee fills an uninit binding | produce(init t) |
A linear T must be consumed exactly once on every path; an affine T may be dropped. Passing by let does not consume the value. Only take does.