lifetime parameter
A name like 'a in a signature that links how long references must stay valid.
A lifetime parameter ('a) is a generic parameter over regions; annotations relate the regions of inputs and outputs and are checked, never used to extend anything.
Loading interactive…
Examples
fn longest<'a>(a: &'a str, b: &'a str) -> &'a strpromises the result is valid only while both inputs are, so it can't be used after either owner is gone.