Skip to main content

clone_behavior/
lib.rs

1// See https://linebender.org/blog/doc-include for this README inclusion strategy
2// File links are not supported by rustdoc
3//!
4//! [LICENSE-APACHE]: https://github.com/robofinch/clone-behavior/blob/main/LICENSE-APACHE
5//! [LICENSE-MIT]: https://github.com/robofinch/clone-behavior/blob/main/LICENSE-MIT
6//!
7//! <style>
8//! .rustdoc-hidden { display: none; }
9//! </style>
10#![cfg_attr(doc, doc = include_str!("../README.md"))]
11
12#![no_std]
13
14#[cfg(feature = "std")]
15extern crate std;
16
17#[cfg(feature = "alloc")]
18extern crate alloc;
19
20
21mod speed;
22
23mod deep;
24mod mirrored;
25
26
27pub use self::{
28    deep::{DeepClone, FastDeepClone},
29    mirrored::{FastMirroredClone, MirroredClone},
30    speed::{Fast, MaybeSlow, Speed},
31};
32
33
34macro_rules! call_varargs_macro {
35    ($macro:ident) => {
36        $macro!(T1);
37        $macro!(T1, T2);
38        $macro!(T1, T2, T3);
39        $macro!(T1, T2, T3, T4);
40        $macro!(T1, T2, T3, T4, T5);
41        $macro!(T1, T2, T3, T4, T5, T6);
42        $macro!(T1, T2, T3, T4, T5, T6, T7);
43        $macro!(T1, T2, T3, T4, T5, T6, T7, T8);
44        $macro!(T1, T2, T3, T4, T5, T6, T7, T8, T9);
45        $macro!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10);
46        $macro!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11);
47        $macro!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12);
48    };
49}
50
51pub(crate) use call_varargs_macro;