devela/text/fmt/
reexports.rs

1// devela::text::fmt::reexports
2//
3//!
4//
5
6use crate::{TAG_ERROR, TAG_FMT, TAG_RESULT, reexport};
7
8/* macros */
9
10reexport! { rust: core,
11    tag: TAG_FMT!(),
12    doc: "Constructs parameters for the other string-formatting macros.",
13    format_args
14}
15reexport! { rust: core,
16    tag: TAG_FMT!(),
17    doc: "Writes formatted data into a buffer.",
18    write
19}
20reexport! { rust: core,
21    tag: TAG_FMT!(),
22    doc: "Writes formatted data into a buffer, with a newline appended.",
23    writeln
24}
25
26reexport! { rust: alloc,
27    tag: TAG_FMT!(),
28    doc: "Creates a String using interpolation of runtime expressions.",
29    format
30}
31
32/* traits */
33
34reexport! { rust: core::fmt,
35    tag: TAG_FMT!(),
36    doc: "`b` formatting.",
37    Binary
38}
39reexport! { rust: core::fmt,
40    tag: TAG_FMT!(),
41    doc: "`?` formatting.",
42    Debug
43}
44reexport! { rust: core::fmt,
45    tag: TAG_FMT!(),
46    doc: "Format trait for an empty format, `{}`.",
47    Display
48}
49reexport! { rust: core::fmt,
50    tag: TAG_FMT!(),
51    doc: "`e` formatting.",
52    LowerExp
53}
54reexport! { rust: core::fmt,
55    tag: TAG_FMT!(),
56    doc: "`x` formatting.",
57    LowerHex
58}
59reexport! { rust: core::fmt,
60    tag: TAG_FMT!(),
61    doc: "`o` formatting.",
62    Octal
63}
64reexport! { rust: core::fmt,
65    tag: TAG_FMT!(),
66    doc: "`p` formatting.",
67    Pointer
68}
69reexport! { rust: core::fmt,
70    tag: TAG_FMT!(),
71    doc: "`E` formatting.",
72    UpperExp
73}
74reexport! { rust: core::fmt,
75    tag: TAG_FMT!(),
76    doc: "`X` formatting.",
77    UpperHex
78}
79reexport! { rust: core::fmt,
80    tag: TAG_FMT!(),
81    doc: "Writing or formatting into Unicode-accepting buffers or streams.",
82    @Write as FmtWrite
83}
84
85/* enums */
86
87reexport! { rust: core::fmt,
88    tag: TAG_FMT!(),
89    doc: "Possible alignments returned by `Formatter::align`.",
90    @Alignment as FmtAlignment
91}
92
93/* aliases */
94
95#[doc = TAG_RESULT!()]
96#[doc = TAG_FMT!()]
97/// The type returned by formatter methods.
98///
99/// Note that this is not the same as [`core::fmt::Result`], since this one
100/// doesn't hardcode the returned type to `()`.
101pub type FmtResult<T> = Result<T, FmtError>;
102
103/* structs */
104
105reexport! { rust: core::fmt,
106    tag: TAG_FMT!(),
107    doc: "Represents a safely precompiled version of a format string and its arguments.",
108    @Arguments as FmtArguments
109}
110reexport! { rust: core::fmt,
111    tag: TAG_FMT!(),
112    doc: "A struct to help with [`Debug`] implementations.",
113    DebugList
114}
115reexport! { rust: core::fmt,
116    tag: TAG_FMT!(),
117    doc: "A struct to help with [`Debug`] implementations.",
118    DebugMap
119}
120reexport! { rust: core::fmt,
121    tag: TAG_FMT!(),
122    doc: "A struct to help with [`Debug`] implementations.",
123    DebugSet
124}
125reexport! { rust: core::fmt,
126    tag: TAG_FMT!(),
127    doc: "A struct to help with [`Debug`] implementations.",
128    DebugStruct
129}
130reexport! { rust: core::fmt,
131    tag: TAG_FMT!(),
132    doc: "A struct to help with [`Debug`] implementations.",
133    DebugTuple
134}
135reexport! { rust: core::fmt,
136    tag: concat![TAG_ERROR!(), TAG_FMT!()],
137    doc: "The error type which is returned from formatting a message into a stream.",
138    @Error as FmtError
139}
140reexport! { rust: core::fmt,
141    tag: TAG_FMT!(),
142    doc: "Configuration for formatting.",
143    Formatter
144}