Gusket
Gusket is a getter/setter derive macro.
getset
:
Comparison with gusket
only 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.gusket
uses the struct visibility by default. This means that the usual boilerplate#[getset(get = "pub", get_mut = "pub", set = "pub")]
is simplified to just#[gusket]
.gusket
generates code from the span of the field (not the derive call), so error messages are more readable.