typestate
#[typestate]
See the module documentation for a full featured tutorial on how to use #[typestate].