devela/text/fmt/
reexports.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
// devela::text::fmt::reexports
//
//!
//

use crate::reexport;

/* macros */

reexport! { rust: core,
    doc: "Constructs parameters for the other string-formatting macros.",
    format_args
}
reexport! { rust: alloc,
    doc: "Creates a String using interpolation of runtime expressions.",
    format
}
reexport! { rust: core,
    doc: "Writes formatted data into a buffer.",
    write
}
reexport! { rust: core,
    doc: "Writes formatted data into a buffer, with a newline appended.",
    writeln
}

/* functions */

reexport! { rust: alloc::fmt,
    doc: "Takes an [`FmtArguments`] struct and returns the resulting formatted string.",
    @format as fmt_format
}
reexport! { rust: core::fmt,
    doc: "Takes an output stream, and an [`FmtArguments`] struct.",
    @write as fmt_write
}

/* traits */

reexport! { rust: core::fmt,
    doc: "`b` formatting.",
    Binary
}
reexport! { rust: core::fmt,
    doc: "`?` formatting.",
    Debug
}
reexport! { rust: core::fmt,
    doc: "Format trait for an empty format, `{}`.",
    Display
}
reexport! { rust: core::fmt,
    doc: "`e` formatting.",
    LowerExp
}
reexport! { rust: core::fmt,
    doc: "`x` formatting.",
    LowerHex
}
reexport! { rust: core::fmt,
    doc: "`o` formatting.",
    Octal
}
reexport! { rust: core::fmt,
    doc: "`p` formatting.",
    Pointer
}
reexport! { rust: core::fmt,
    doc: "`E` formatting.",
    UpperExp
}
reexport! { rust: core::fmt,
    doc: "`X` formatting.",
    UpperHex
}
reexport! { rust: core::fmt,
    doc: "Writing or formatting into Unicode-accepting buffers or streams.",
    @Write as TextWrite
}

/* enums */

reexport! { rust: core::fmt,
    doc: "Possible alignments returned by `Formatter::align`.",
    @Alignment as FmtAlignment
}

/* aliases */

#[doc = crate::TAG_RESULT!()]
/// The type returned by formatter methods.
///
/// Note that this is not the same as [`core::fmt::Result`], since this one
/// doesn't hardcode the returned type to `()`.
pub type FmtResult<T> = Result<T, FmtError>;

/* structs */

reexport! { rust: core::fmt,
    doc: "Represents a safely precompiled version of a format string and its arguments.",
    @Arguments as FmtArguments
}
reexport! { rust: core::fmt,
    doc: "A struct to help with [`Debug`] implementations.",
    DebugList
}
reexport! { rust: core::fmt,
    doc: "A struct to help with [`Debug`] implementations.",
    DebugMap
}
reexport! { rust: core::fmt,
    doc: "A struct to help with [`Debug`] implementations.",
    DebugSet
}
reexport! { rust: core::fmt,
    doc: "A struct to help with [`Debug`] implementations.",
    DebugStruct
}
reexport! { rust: core::fmt,
    doc: "A struct to help with [`Debug`] implementations.",
    DebugTuple
}
reexport! { rust: core::fmt,
    tag: crate::TAG_ERROR!(),
    doc: "The error type which is returned from formatting a message into a stream.",
    @Error as FmtError
}
reexport! { rust: core::fmt,
    doc: "Configuration for formatting.",
    Formatter
}