shorthand
shorthand
is defined as
a system of fast writing
and that is exactly what this library is for; to remove the annoying
boilerplate code, that comes with writing your own library.
What does this library do?
It makes coding in rust a lot more convenient, by deriving getters
and
setters
for the fields of a struct.
use ShortHand;
let mut example = default;
assert_eq!;
example.set_number;
assert_eq!;
assert_eq!;
example.set_data;
assert_eq!;
Otherwise, you would have to write the this by hand
How do I get started?
Simply add this library under [dependencies]
to your Cargo.toml
[]
= "0.1.0"
You can then derive ShortHand
for any struct
use ShortHand;
You can find the documentation here.
Feature Requests and Bug Reports
Feel free to ask questions or report bugs here. There are no stupid questions.
This library should be as convenient as possible, so please do not hesitate to request a feature.
Reference
This library has been inspired by the following crates
getset
(just the issue tracker and which features were requested)thiserror
derive-builder
proc-macro-workshop