pub struct Values<T: 'static> { /* private fields */ }Expand description
The names of a simple type, as one place reads them: the cases that it tells apart, and
for a type with many names, such as ST_NumberFormat, all the type’s names, of which those
that are no case are drawn as one case.
Implementations§
Source§impl<T> Values<T>
impl<T> Values<T>
Sourcepub const fn new(cases: &'static [Case<T>]) -> Self
pub const fn new(cases: &'static [Case<T>]) -> Self
A table whose cases are all the type’s names.
Sourcepub const fn with_others(
cases: &'static [Case<T>],
names: &'static [&'static str],
other: T,
) -> Self
pub const fn with_others( cases: &'static [Case<T>], names: &'static [&'static str], other: T, ) -> Self
A table of the cases cases and of the type’s names names, which hold the names of
the cases too: each name that is no case is drawn as other.
Sourcepub fn find(&self, value: &str) -> Option<(&T, &'static str, Drawn)>
pub fn find(&self, value: &str) -> Option<(&T, &'static str, Drawn)>
The case of the name value, its spelling and how F-Office draws it, or None when it
is no name of the type: the exact spelling, as XML Schema compares the values of an
enumeration.
Sourcepub fn find_any_case(&self, value: &str) -> Option<(&T, &'static str, Drawn)>
pub fn find_any_case(&self, value: &str) -> Option<(&T, &'static str, Drawn)>
The case of the name value in any ASCII case, as Values::find reads the exact
spelling, with the name as the table spells it: for a keyword of CSS, such as a
property of the style of a VML shape, which CSS2 (4.1.3) reads in any case.