pub trait ValueExt: Sized { fn as_ok<E>(self) -> Result<Self, E> { ... } fn as_some(self) -> Option<Self> { ... } }