tinyvec_macros-0.1.0/.cargo_vcs_info.json0000644000000001121371402226000141040ustar { "git": { "sha1": "24f1c4e9c8b878c904c1673b0becb912f7d55518" } } tinyvec_macros-0.1.0/.gitignore010064400017500001750000000000231371402117200146770ustar 00000000000000/target Cargo.lock tinyvec_macros-0.1.0/Cargo.toml0000644000000014331371402226000121110ustar # 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 believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're # editing this file be aware that the upstream Cargo.toml # will likely look very different (and much more reasonable) [package] edition = "2018" name = "tinyvec_macros" version = "0.1.0" authors = ["Soveu "] description = "Some macros for tiny containers" license = "MIT OR Apache-2.0 OR Zlib" repository = "https://github.com/Soveu/tinyvec_macros" [dependencies] tinyvec_macros-0.1.0/Cargo.toml.orig010064400017500001750000000005601371402214500156050ustar 00000000000000[package] name = "tinyvec_macros" version = "0.1.0" authors = ["Soveu "] edition = "2018" license = "MIT OR Apache-2.0 OR Zlib" repository = "https://github.com/Soveu/tinyvec_macros" description = "Some macros for tiny containers" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] tinyvec_macros-0.1.0/LICENSE010064400017500001750000000020461371402177200137310ustar 00000000000000MIT License Copyright (c) 2020 Soveu 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. tinyvec_macros-0.1.0/src/lib.rs010064400017500001750000000011201371402215400146120ustar 00000000000000#![no_std] #[macro_export] macro_rules! impl_mirrored { { type Mirror = $tinyname:ident; $( $(#[$attr:meta])* $v:vis fn $fname:ident ($seif:ident : $seifty:ty $(,$argname:ident : $argtype:ty)*) $(-> $ret:ty)? ; )* } => { $( $(#[$attr])* #[inline(always)] $v fn $fname($seif : $seifty, $($argname: $argtype),*) $(-> $ret)? { match $seif { $tinyname::Inline(i) => i.$fname($($argname),*), $tinyname::Heap(h) => h.$fname($($argname),*), } } )* }; }