pub trait Loader { type Output; fn load<P: AsRef<Path>>(filename: P) -> Result<Self::Output>; fn load_from_reader<R: Read>(reader: &mut R) -> Result<Self::Output>; }