getter-methods
This is getter-methods
, a derive macro that will generate an impl with accessor methods for each
field on the struct.
Using getter-methods
is straightforward: simply derive it:
use GetterMethods;
let foo = Foo ;
assert_eq!;
assert_eq!;
For more, see the documentation.