defmt/impls/
alloc_.rs

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