# getter-methods
[](https://github.com/lukesneeringer/getter-methods/actions/workflows/ci.yaml)
[](https://docs.rs/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:
```rs
use getter_methods::GetterMethods;
#[derive(GetterMethods)]
struct Foo {
bar: String,
baz: i64,
}
let foo = Foo { bar: "bacon".into(), baz: 42 };
assert_eq!(foo.bar(), "bacon");
assert_eq!(foo.baz(), 42);
```
For more, see [the documentation](https://docs.rs/getter-methods).