darling_macro-0.14.4/.cargo_vcs_info.json0000644000000001430000000000100137210ustar { "git": { "sha1": "4186e42444e9d389403671010ed69483e9e47fb9" }, "path_in_vcs": "macro" }darling_macro-0.14.4/Cargo.toml0000644000000017410000000000100117240ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2018" name = "darling_macro" version = "0.14.4" authors = ["Ted Driggs "] description = """ Internal support for a proc-macro library for reading attributes into structs when implementing custom derives. Use https://crates.io/crates/darling in your code. """ license = "MIT" repository = "https://github.com/TedDriggs/darling" [lib] proc-macro = true [dependencies.darling_core] version = "=0.14.4" [dependencies.quote] version = "1.0.18" [dependencies.syn] version = "1.0.91" darling_macro-0.14.4/Cargo.toml.orig000064400000000000000000000007661046102023000154130ustar 00000000000000[package] name = "darling_macro" version = "0.14.4" authors = ["Ted Driggs "] repository = "https://github.com/TedDriggs/darling" description = """ Internal support for a proc-macro library for reading attributes into structs when implementing custom derives. Use https://crates.io/crates/darling in your code. """ license = "MIT" edition = "2018" [dependencies] quote = "1.0.18" syn = "1.0.91" darling_core = { version = "=0.14.4", path = "../core" } [lib] proc-macro = true darling_macro-0.14.4/LICENSE000064400000000000000000000020531046102023000135200ustar 00000000000000MIT License Copyright (c) 2017 Ted Driggs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. darling_macro-0.14.4/src/lib.rs000064400000000000000000000027331046102023000144230ustar 00000000000000// This is needed for 1.31.0 to keep compiling extern crate proc_macro; use darling_core::{derive, Error}; use proc_macro::TokenStream; use syn::parse_macro_input; #[proc_macro_derive(FromMeta, attributes(darling))] pub fn derive_from_meta(input: TokenStream) -> TokenStream { derive::from_meta(&parse_macro_input!(input)).into() } #[proc_macro_derive(FromMetaItem, attributes(darling))] pub fn derive_from_meta_item(_input: TokenStream) -> TokenStream { Error::custom("darling::FromMetaItem has been replaced by darling::FromMeta") .write_errors() .into() } #[proc_macro_derive(FromAttributes, attributes(darling))] pub fn derive_from_attributes(input: TokenStream) -> TokenStream { derive::from_attributes(&parse_macro_input!(input)).into() } #[proc_macro_derive(FromDeriveInput, attributes(darling))] pub fn derive_from_input(input: TokenStream) -> TokenStream { derive::from_derive_input(&parse_macro_input!(input)).into() } #[proc_macro_derive(FromField, attributes(darling))] pub fn derive_field(input: TokenStream) -> TokenStream { derive::from_field(&parse_macro_input!(input)).into() } #[proc_macro_derive(FromTypeParam, attributes(darling))] pub fn derive_type_param(input: TokenStream) -> TokenStream { derive::from_type_param(&parse_macro_input!(input)).into() } #[proc_macro_derive(FromVariant, attributes(darling))] pub fn derive_variant(input: TokenStream) -> TokenStream { derive::from_variant(&parse_macro_input!(input)).into() }