Expand description
§Gusket
Gusket is a getter/setter derive macro.
§Comparison with getset:
gusketonly exposes one derive macro. No need toderive(Getters, MutGetters, Setters)all the time. This avoids accidentally forgetting some derives, e.g. writing#[getset(get_copy)]with only#[derive(getset::Getters)]will generate nothing without triggering a compile error.gusketuses the struct visibility by default. This means that the usual boilerplate#[getset(get = "pub", get_mut = "pub", set = "pub")]is simplified to just#[gusket].gusketgenerates code from the span of the field (not the derive call), so error messages are more readable.
Derive Macros§
- Gusket
- Derives getters and setters implementation for a struct.