pub trait Narrow{ type Output; fn narrow(self)->Self::Output; } #[derive(Debug)] pub enum NarrowError{ Overflow, Underflow, } pub trait TryNarrow{ type Output; fn try_narrow(self)->Result; } #[cfg(test)] mod tests { use super::*; impl TryNarrow for i16{ type Output=i8; fn try_narrow(self)->Result{ if self