num_runtime_fmt/align.rs
1/// Positioning of rendered number within the allotted `width`.
2///
3/// - `Right`: the output is right-aligned in `width` columns (default).
4/// - `Center`: the output is centered in `width` columns.
5/// - `Left`: the output is left-aligned in `width` columns.
6/// - `Decimal`: `width` sets the minimal width before the decimal. For integers,
7/// equivalent to `Right`.
8#[derive(Clone, Copy, PartialEq, Eq, Debug)]
9pub enum Align {
10 Left,
11 Center,
12 Right,
13 Decimal,
14}
15
16impl Default for Align {
17 #[inline]
18 fn default() -> Self {
19 Self::Right
20 }
21}