https://github.com/sokomishalov/lombok-rs
Lombok port for Rust
https://github.com/sokomishalov/lombok-rs
builder equals getters hashcode lombok proc-macro rust setters tostring
Last synced: 25 days ago
JSON representation
Lombok port for Rust
- Host: GitHub
- URL: https://github.com/sokomishalov/lombok-rs
- Owner: sokomishalov
- License: apache-2.0
- Created: 2020-09-24T11:05:41.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-15T11:24:08.000Z (over 1 year ago)
- Last Synced: 2025-04-11T23:17:38.122Z (27 days ago)
- Topics: builder, equals, getters, hashcode, lombok, proc-macro, rust, setters, tostring
- Language: Rust
- Homepage:
- Size: 50.8 KB
- Stars: 46
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE.md
Awesome Lists containing this project
README
# Lombok Rust
[](https://docs.rs/lombok/)
[](https://crates.io/crates/lombok)
[](https://crates.io/crates/lombok)[Lombok](https://projectlombok.org) port for Rust.
## Why?
Just because I can!
This crate is not actually a must-have one for development in Rust (unlike Java world), but if you find it useful - it
would be great. Anyway - boilerplate sucks, so get some proc macros stuff to decrease it.Any feedback is appreciated.
## Implementation list so far
- [x] `@Getter` - `#[derive(Getter)]`/`#[derive(GetterMut)]`
- [x] `@Setter` - `#[derive(Setter)]`
- [x] `@EqualsAndHashCode` - `#[derive(EqualsAndHashCode)]`
- [x] `@ToString` - `#[derive(ToString)]`
- [x] `@Data` - `#[derive(Data)]`
- [x] `@Value` - `#[derive(Value)]`
- [x] `@NoArgsConstructor` - `#[derive(NoArgsConstructor)]`
- [x] `@AllArgsConstructor` - `#[derive(AllArgsConstructor)]`
- [x] `@Builder` - `#[derive(Builder)]`## Usage
Update `Cargo.toml`
```toml
[dependencies]
lombok = "0.4"
```Source code usage examples you can see [in tests](./tests/tests.rs).
## License
Licensed under either of [Apache License, Version 2.0](LICENSE-APACHE.md) or [MIT license](LICENSE-MIT.md) at your
option.Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as
defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.