Get enumerators corresponding to a `Details::Enum`.
(&self, last: u8, enumerators: u16)
| 338 | impl Template { |
| 339 | /// Get enumerators corresponding to a `Details::Enum`. |
| 340 | pub fn enums(&self, last: u8, enumerators: u16) -> &[&'static str] { |
| 341 | let from = enumerators as usize; |
| 342 | let len = usize::from(last) + 1; |
| 343 | &self.enumerators[from..from + len] |
| 344 | } |
| 345 | |
| 346 | /// Format a setting value as a TOML string. This is mostly for use by the generated |
| 347 | /// `Display` implementation. |
no test coverage detected