Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dracarys18/proc_macro
https://github.com/dracarys18/proc_macro
proc-macro rust
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dracarys18/proc_macro
- Owner: dracarys18
- Created: 2022-08-26T07:26:29.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-24T07:12:28.000Z (almost 2 years ago)
- Last Synced: 2024-11-03T05:42:10.904Z (about 2 months ago)
- Topics: proc-macro, rust
- Language: Rust
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Macros
This is a set of proc macros that I use.
- ```#[no_unwrap]```
This proc macro detects unwraps in the function body and returns error if there is any unwrap.- ```#[derive(Builder)]```
This proc macro creates a builder struct for the given struct. Panics if there is no fields in the struct- ```#[optinal]```
This proc macro creates an Optional struct which makes all the fields option.The new struct includes all the attributes
from parent struct. Useful while updating a struct in the Database.- ```ternary!(2==2?"Yes":"No")```
This proc macro makes you to use ternary operators like it is in java in rust.