| Crates.io | unwrapped-core |
| lib.rs | unwrapped-core |
| version | 0.1.2 |
| created_at | 2025-06-27 17:18:02.954953+00 |
| updated_at | 2026-01-08 00:56:07.879594+00 |
| description | Core library for unwrapped |
| homepage | |
| repository | https://github.com/stayhydated/unwrapped |
| max_upload_size | |
| id | 1729037 |
| size | 17,928 |
Core logic for generating unwrapped struct variants. This crate is intended for proc-macro authors who want to generate unwrapped structs as part of their own macros.
use syn::DeriveInput;
use unwrapped_core::{Opts, ProcUsageOpts, unwrapped};
#[proc_macro_derive(MyMacro)]
pub fn my_macro(input: TokenStream) -> TokenStream {
let derive_input: DeriveInput = syn::parse(input).unwrap();
let opts = Opts::builder()
.suffix(format_ident!("Unwrapped"))
.build();
let generated = unwrapped(&derive_input, Some(opts), ProcUsageOpts::default());
// ... combine with your macro's output ...
}