1 2 3 4 5 6 7 8 9 10 11
pub enum State<T> { Start, Middle(T), End, } impl<T> From<T> for State<T> { fn from(it: T) -> Self { Self::Middle(it) } }