getter-methods 2.0.2

Derive macro to create getter / accessor methods.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![allow(clippy::disallowed_names)]

use getter_methods::Getters;

#[derive(Debug, Getters)]
struct Foo<'a> {
  ref_: &'a str,
}

fn main() {
  let foo = Foo { ref_: QUICK };
  assert_eq!(foo.ref_(), QUICK);
}

static QUICK: &str = "The quick brown fox jumped over the lazy dogs.";