| 43 | /// is wider than the content. |
| 44 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] |
| 45 | pub enum Alignment { |
| 46 | /// Align content to the left (default). |
| 47 | /// |
| 48 | /// Extra space is added to the right of the content. |
| 49 | #[default] |
| 50 | Left, |
| 51 | |
| 52 | /// Align content to the right. |
| 53 | /// |
| 54 | /// Extra space is added to the left of the content. |
| 55 | #[allow(dead_code)] // used in apply() match arm |
| 56 | Right, |
| 57 | |
| 58 | /// Center content. |
| 59 | /// |
| 60 | /// Extra space is distributed evenly on both sides. |
| 61 | Center, |
| 62 | } |
| 63 | |
| 64 | impl Alignment { |
| 65 | /// Apply this alignment to a string within a given width. |
nothing calls this directly
no outgoing calls
no test coverage detected