pub trait Factory { type Object; fn build() -> Result<Self::Object, Error>; }
Implement this trait to provide a convenient syntax for constructing implementations of dependencies.