1use crate::emit_traits;
2use newer_type::target;
3
4emit_traits! {
5 #[implement_of(newer_type_std::fmt::Display)]
6 #[slot(u8)]
7 #[target(alternative = ::core::fmt::Display)]
8 pub trait Display {
9 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result;
10 }
11
12 #[implement_of(newer_type_std::fmt::Debug)]
13 #[slot(u8)]
14 #[target(alternative = ::core::fmt::Debug)]
15 pub trait Debug {
16 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result;
17 }
18
19
20 #[implement_of(newer_type_std::fmt::Binary)]
21 #[slot(u8)]
22 #[target(alternative = ::core::fmt::Binary)]
23 pub trait Binary {
24 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result;
25 }
26
27
28 #[implement_of(newer_type_std::fmt::Octal)]
29 #[slot(u8)]
30 #[target(alternative = ::core::fmt::Octal)]
31 pub trait Octal {
32 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result;
33 }
34
35
36 #[implement_of(newer_type_std::fmt::LowerHex)]
37 #[slot(u8)]
38 #[target(alternative = ::core::fmt::LowerHex)]
39 pub trait LowerHex {
40 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result;
41 }
42
43
44 #[implement_of(newer_type_std::fmt::UpperHex)]
45 #[slot(u8)]
46 #[target(alternative = ::core::fmt::UpperHex)]
47 pub trait UpperHex {
48 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result;
49 }
50
51
52 #[implement_of(newer_type_std::fmt::LowerExp)]
53 #[slot(u8)]
54 #[target(alternative = ::core::fmt::LowerExp)]
55 pub trait LowerExp {
56 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result;
57 }
58
59
60 #[implement_of(newer_type_std::fmt::UpperExp)]
61 #[slot(u8)]
62 #[target(alternative = ::core::fmt::UpperExp)]
63 pub trait UpperExp {
64 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result;
65 }
66
67
68 #[implement_of(newer_type_std::fmt::Pointer)]
69 #[slot(Box<u8>)]
70 #[target(alternative = ::core::fmt::Pointer)]
71 pub trait Pointer {
72 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result;
73 }
74
75
76 #[implement_of(newer_type_std::fmt::Write)]
77 #[slot(String)]
78 #[target(alternative = ::core::fmt::Write)]
79 pub trait Write {
80 fn write_str(&mut self, s: &::core::primitive::str) -> ::core::fmt::Result;
81 fn write_char(&mut self, c: ::core::primitive::char) -> ::core::fmt::Result;
82 fn write_fmt(&mut self, args: ::core::fmt::Arguments<'_>) -> ::core::fmt::Result;
83 }
84}