DF
Size: a a a
DF
MB
K
IL
trait Foo {
fn name() -> & 'static str;
fn lower_case_name() -> & 'static str { здесь как-то похимичить }
}
struct Bar {}
impl Foo for Bar { fn name() -> & 'static str {"Bar"} }
assert_eq!("bar", Bar::lower_case_name())MB
IL
MB
K
IL
IL
IL
K
IL
PL
Cached<I> и добавить инстанс Foo for Cached where I: Foo + Any, а различать по typeid?PL
IL
MB
IL
K
PL