The 'a (tick a) is a generic lifetime parameter. Rust has to ensure that the lifetime of the
Pluggin instance is at least as long as the lifetime of the Demo instance.
The declaration:
pub struct Demo<'a, T> where T: Plug + Debug + 'a {
pluggin: Option<&'a mut T>
}
says that:
- Demo has lifetime 'a
- T has at least lifetime 'a
- Option holds a mutable reference to T with the same lifetime
All that allows the Rust compiler to check that the lifetime of the Pluggin includes the lifetime
of Demo.