mirror of
https://github.com/qdrant/qdrant.git
synced 2026-08-05 01:20:53 -05:00
* Add Anonymize macro * Use Anonymize macro * anonymize metadata --------- Co-authored-by: generall <andrey@vasnetsov.com>
12 lines
300 B
Rust
12 lines
300 B
Rust
use proc_macro::TokenStream;
|
|
|
|
mod anonymize;
|
|
|
|
#[proc_macro_derive(Anonymize, attributes(anonymize))]
|
|
pub fn derive_anonymize(input: TokenStream) -> TokenStream {
|
|
match anonymize::derive_anonymize(input.into()) {
|
|
Ok(ts) => ts.into(),
|
|
Err(e) => e.to_compile_error().into(),
|
|
}
|
|
}
|