#Deriving a trait outside of the struct definition
1 messages · Page 1 of 1 (latest)
1 messages · Page 1 of 1 (latest)
I'm wondering if its possible to define a struct like struct Number(i32) and then in another module derive a Default impl (without actually just doing impl Default for....)
no
In general, nothing can ever have information about the definition of a struct (or other type) without either: