A blog about software development.| Serhii Potapov (greyblake)
A blog about software development.| Serhii Potapov (greyblake)
Thank you for the idea. I made slightly different implementation based on it: playground The usage is as follows: // simple types impl MyMainTrait for i32 { type BlanketType = SimpleType; } impl MyMainTrait for &str { type BlanketType = SimpleType; } // struct types struct Foo { field: i32, } impl MyMainTrait for Foo { type BlanketType = StructType; } impl StructTrait for Foo { const FIELDS: &'static [&'static str] = &["field"]; fn do_somethin...| The Rust Programming Language Forum
A value-to-value conversion that consumes the input value. The opposite of `From`.| doc.rust-lang.org
A blog about software development.| Serhii Potapov (greyblake)
Used to do value-to-value conversions while consuming the input value. It is the reciprocal of `Into`.| doc.rust-lang.org