| 1 | use crate::JsonSchema; |
| 2 | use crate::_alloc_prelude::*; |
| 3 | |
| 4 | macro_rules! wrapper_impl { |
| 5 | ($($desc:tt)+) => { |
| 6 | forward_impl!(($($desc)+ where T: JsonSchema) => T); |
| 7 | }; |
| 8 | } |
| 9 | |
| 10 | wrapper_impl!(<'a, T: ?Sized> JsonSchema for &'a T); |
| 11 | wrapper_impl!(<'a, T: ?Sized> JsonSchema for &'a mut T); |
| 12 | wrapper_impl!(<T: ?Sized> JsonSchema for Box<T>); |
| 13 | wrapper_impl!(<T: ?Sized> JsonSchema for alloc::rc::Rc<T>); |
| 14 | wrapper_impl!(<T: ?Sized> JsonSchema for alloc::rc::Weak<T>); |
| 15 | wrapper_impl!(<T: ?Sized> JsonSchema for alloc::sync::Arc<T>); |
| 16 | wrapper_impl!(<T: ?Sized> JsonSchema for alloc::sync::Weak<T>); |
| 17 | #[cfg(feature = "std")] |
| 18 | wrapper_impl!(<T: ?Sized> JsonSchema for std::sync::Mutex<T>); |
| 19 | #[cfg(feature = "std")] |
| 20 | wrapper_impl!(<T: ?Sized> JsonSchema for std::sync::RwLock<T>); |
| 21 | wrapper_impl!(<T: ?Sized> JsonSchema for core::cell::Cell<T>); |
| 22 | wrapper_impl!(<T: ?Sized> JsonSchema for core::cell::RefCell<T>); |
| 23 | wrapper_impl!(<'a, T: ?Sized + ToOwned> JsonSchema for alloc::borrow::Cow<'a, T>); |
| 24 | wrapper_impl!(<T> JsonSchema for core::num::Wrapping<T>); |
| 25 | wrapper_impl!(<T> JsonSchema for core::cmp::Reverse<T>); |