1 | use super::*; |
2 | |
3 | impl<T> Format for alloc::boxed::Box<T> |
4 | where |
5 | T: ?Sized + Format, |
6 | { |
7 | delegate_format!(T, self, &*self); |
8 | } |
9 | |
10 | impl<T> Format for alloc::rc::Rc<T> |
11 | where |
12 | T: ?Sized + Format, |
13 | { |
14 | delegate_format!(T, self, &*self); |
15 | } |
16 | |
17 | #[cfg (not(no_cas))] |
18 | impl<T> Format for alloc::sync::Arc<T> |
19 | where |
20 | T: ?Sized + Format, |
21 | { |
22 | delegate_format!(T, self, &*self); |
23 | } |
24 | |
25 | impl<T> Format for alloc::vec::Vec<T> |
26 | where |
27 | T: Format, |
28 | { |
29 | delegate_format!([T], self, self.as_slice()); |
30 | } |
31 | |
32 | impl Format for alloc::string::String { |
33 | delegate_format!(str, self, self.as_str()); |
34 | } |
35 | |
36 | impl<'a, T> Format for alloc::borrow::Cow<'a, [T]> |
37 | where |
38 | T: 'a + Format, |
39 | [T]: alloc::borrow::ToOwned<Owned = alloc::vec::Vec<T>>, |
40 | { |
41 | delegate_format!([T], self, self.as_ref()); |
42 | } |
43 | |
44 | impl<'a> Format for alloc::borrow::Cow<'a, str> { |
45 | delegate_format!(str, self, self.as_ref()); |
46 | } |
47 | |