use std::fmt;
#[derive(Copy,Clone,Eq,PartialEq,Ord,PartialOrd,Hash)]
#[allow(missing_docs)]
pub enum ValueId {
Accumulate,
AfterEdge,
All,
Alphabetic,
Auto,
Baseline,
BeforeEdge,
Bevel,
BidiOverride,
Blink,
Block,
Bold,
Bolder,
Butt,
Central,
Collapse,
Compact,
Condensed,
CrispEdges,
Crosshair,
CurrentColor,
Default,
EResize,
Embed,
End,
Evenodd,
Expanded,
ExtraCondensed,
ExtraExpanded,
Fill,
GeometricPrecision,
Hanging,
Help,
Hidden,
Ideographic,
Inherit,
Inline,
InlineTable,
Italic,
Large,
Larger,
Lighter,
LineThrough,
LinearRGB,
ListItem,
Lr,
LrTb,
Ltr,
Marker,
Mathematical,
Medium,
Middle,
Miter,
Move,
NResize,
Narrower,
NeResize,
NoChange,
None,
Nonzero,
Normal,
NwResize,
ObjectBoundingBox,
Oblique,
OptimizeLegibility,
OptimizeQuality,
OptimizeSpeed,
Overline,
Pad,
Painted,
Pointer,
Reflect,
Repeat,
ResetSize,
Rl,
RlTb,
Round,
Rtl,
RunIn,
SResize,
Scroll,
SeResize,
SemiCondensed,
SemiExpanded,
Small,
SmallCaps,
Smaller,
Square,
SRGB,
Start,
Stroke,
Sub,
Super,
SwResize,
Table,
TableCaption,
TableCell,
TableColumn,
TableColumnGroup,
TableFooterGroup,
TableHeaderGroup,
TableRow,
TableRowGroup,
Tb,
TbRl,
Text,
TextAfterEdge,
TextBeforeEdge,
UltraCondensed,
UltraExpanded,
Underline,
UseScript,
UserSpaceOnUse,
Visible,
VisibleFill,
VisiblePainted,
VisibleStroke,
WResize,
Wait,
Wider,
XLarge,
XSmall,
XxLarge,
XxSmall,
}
static VALUES: ::phf::Map<&'static str, ValueId> = ::phf::Map {
key: 9603444721912725599,
disps: ::phf::Slice::Static(&[
(0, 59),
(5, 99),
(3, 104),
(2, 26),
(1, 33),
(0, 25),
(0, 16),
(5, 53),
(0, 0),
(13, 34),
(0, 14),
(0, 0),
(2, 50),
(0, 11),
(4, 78),
(11, 59),
(1, 11),
(6, 112),
(0, 101),
(0, 0),
(3, 120),
(0, 5),
(15, 94),
(0, 98),
(14, 8),
]),
entries: ::phf::Slice::Static(&[
("table-column-group", ValueId::TableColumnGroup),
("accumulate", ValueId::Accumulate),
("nonzero", ValueId::Nonzero),
("n-resize", ValueId::NResize),
("nw-resize", ValueId::NwResize),
("mathematical", ValueId::Mathematical),
("extra-expanded", ValueId::ExtraExpanded),
("ideographic", ValueId::Ideographic),
("bidi-override", ValueId::BidiOverride),
("optimizeSpeed", ValueId::OptimizeSpeed),
("s-resize", ValueId::SResize),
("marker", ValueId::Marker),
("text-after-edge", ValueId::TextAfterEdge),
("rtl", ValueId::Rtl),
("wider", ValueId::Wider),
("scroll", ValueId::Scroll),
("sw-resize", ValueId::SwResize),
("small", ValueId::Small),
("visible", ValueId::Visible),
("central", ValueId::Central),
("lighter", ValueId::Lighter),
("xx-small", ValueId::XxSmall),
("list-item", ValueId::ListItem),
("optimizeLegibility", ValueId::OptimizeLegibility),
("table-row-group", ValueId::TableRowGroup),
("hanging", ValueId::Hanging),
("no-change", ValueId::NoChange),
("move", ValueId::Move),
("lr-tb", ValueId::LrTb),
("linearRGB", ValueId::LinearRGB),
("visiblePainted", ValueId::VisiblePainted),
("all", ValueId::All),
("compact", ValueId::Compact),
("x-small", ValueId::XSmall),
("userSpaceOnUse", ValueId::UserSpaceOnUse),
("end", ValueId::End),
("small-caps", ValueId::SmallCaps),
("wait", ValueId::Wait),
("semi-condensed", ValueId::SemiCondensed),
("currentColor", ValueId::CurrentColor),
("geometricPrecision", ValueId::GeometricPrecision),
("blink", ValueId::Blink),
("ne-resize", ValueId::NeResize),
("round", ValueId::Round),
("baseline", ValueId::Baseline),
("painted", ValueId::Painted),
("help", ValueId::Help),
("smaller", ValueId::Smaller),
("reflect", ValueId::Reflect),
("run-in", ValueId::RunIn),
("fill", ValueId::Fill),
("w-resize", ValueId::WResize),
("inline", ValueId::Inline),
("xx-large", ValueId::XxLarge),
("large", ValueId::Large),
("text-before-edge", ValueId::TextBeforeEdge),
("ultra-expanded", ValueId::UltraExpanded),
("objectBoundingBox", ValueId::ObjectBoundingBox),
("italic", ValueId::Italic),
("normal", ValueId::Normal),
("table-caption", ValueId::TableCaption),
("ultra-condensed", ValueId::UltraCondensed),
("square", ValueId::Square),
("extra-condensed", ValueId::ExtraCondensed),
("evenodd", ValueId::Evenodd),
("rl", ValueId::Rl),
("ltr", ValueId::Ltr),
("auto", ValueId::Auto),
("oblique", ValueId::Oblique),
("before-edge", ValueId::BeforeEdge),
("hidden", ValueId::Hidden),
("super", ValueId::Super),
("text", ValueId::Text),
("collapse", ValueId::Collapse),
("visibleFill", ValueId::VisibleFill),
("table-column", ValueId::TableColumn),
("overline", ValueId::Overline),
("pointer", ValueId::Pointer),
("se-resize", ValueId::SeResize),
("line-through", ValueId::LineThrough),
("table-header-group", ValueId::TableHeaderGroup),
("condensed", ValueId::Condensed),
("visibleStroke", ValueId::VisibleStroke),
("none", ValueId::None),
("semi-expanded", ValueId::SemiExpanded),
("sub", ValueId::Sub),
("repeat", ValueId::Repeat),
("table-cell", ValueId::TableCell),
("x-large", ValueId::XLarge),
("after-edge", ValueId::AfterEdge),
("crosshair", ValueId::Crosshair),
("butt", ValueId::Butt),
("tb", ValueId::Tb),
("inline-table", ValueId::InlineTable),
("larger", ValueId::Larger),
("block", ValueId::Block),
("use-script", ValueId::UseScript),
("pad", ValueId::Pad),
("tb-rl", ValueId::TbRl),
("table-footer-group", ValueId::TableFooterGroup),
("narrower", ValueId::Narrower),
("bolder", ValueId::Bolder),
("underline", ValueId::Underline),
("miter", ValueId::Miter),
("embed", ValueId::Embed),
("optimizeQuality", ValueId::OptimizeQuality),
("reset-size", ValueId::ResetSize),
("lr", ValueId::Lr),
("medium", ValueId::Medium),
("stroke", ValueId::Stroke),
("e-resize", ValueId::EResize),
("bold", ValueId::Bold),
("sRGB", ValueId::SRGB),
("table", ValueId::Table),
("default", ValueId::Default),
("table-row", ValueId::TableRow),
("expanded", ValueId::Expanded),
("start", ValueId::Start),
("rl-tb", ValueId::RlTb),
("middle", ValueId::Middle),
("alphabetic", ValueId::Alphabetic),
("crispEdges", ValueId::CrispEdges),
("inherit", ValueId::Inherit),
("bevel", ValueId::Bevel),
]),
};
impl ValueId {
pub fn from_name(text: &str) -> Option<ValueId> {
VALUES.get(text).cloned()
}
pub fn name(&self) -> &str {
match *self {
ValueId::Accumulate => "accumulate",
ValueId::AfterEdge => "after-edge",
ValueId::All => "all",
ValueId::Alphabetic => "alphabetic",
ValueId::Auto => "auto",
ValueId::Baseline => "baseline",
ValueId::BeforeEdge => "before-edge",
ValueId::Bevel => "bevel",
ValueId::BidiOverride => "bidi-override",
ValueId::Blink => "blink",
ValueId::Block => "block",
ValueId::Bold => "bold",
ValueId::Bolder => "bolder",
ValueId::Butt => "butt",
ValueId::Central => "central",
ValueId::Collapse => "collapse",
ValueId::Compact => "compact",
ValueId::Condensed => "condensed",
ValueId::CrispEdges => "crispEdges",
ValueId::Crosshair => "crosshair",
ValueId::CurrentColor => "currentColor",
ValueId::Default => "default",
ValueId::EResize => "e-resize",
ValueId::Embed => "embed",
ValueId::End => "end",
ValueId::Evenodd => "evenodd",
ValueId::Expanded => "expanded",
ValueId::ExtraCondensed => "extra-condensed",
ValueId::ExtraExpanded => "extra-expanded",
ValueId::Fill => "fill",
ValueId::GeometricPrecision => "geometricPrecision",
ValueId::Hanging => "hanging",
ValueId::Help => "help",
ValueId::Hidden => "hidden",
ValueId::Ideographic => "ideographic",
ValueId::Inherit => "inherit",
ValueId::Inline => "inline",
ValueId::InlineTable => "inline-table",
ValueId::Italic => "italic",
ValueId::Large => "large",
ValueId::Larger => "larger",
ValueId::Lighter => "lighter",
ValueId::LineThrough => "line-through",
ValueId::LinearRGB => "linearRGB",
ValueId::ListItem => "list-item",
ValueId::Lr => "lr",
ValueId::LrTb => "lr-tb",
ValueId::Ltr => "ltr",
ValueId::Marker => "marker",
ValueId::Mathematical => "mathematical",
ValueId::Medium => "medium",
ValueId::Middle => "middle",
ValueId::Miter => "miter",
ValueId::Move => "move",
ValueId::NResize => "n-resize",
ValueId::Narrower => "narrower",
ValueId::NeResize => "ne-resize",
ValueId::NoChange => "no-change",
ValueId::None => "none",
ValueId::Nonzero => "nonzero",
ValueId::Normal => "normal",
ValueId::NwResize => "nw-resize",
ValueId::ObjectBoundingBox => "objectBoundingBox",
ValueId::Oblique => "oblique",
ValueId::OptimizeLegibility => "optimizeLegibility",
ValueId::OptimizeQuality => "optimizeQuality",
ValueId::OptimizeSpeed => "optimizeSpeed",
ValueId::Overline => "overline",
ValueId::Pad => "pad",
ValueId::Painted => "painted",
ValueId::Pointer => "pointer",
ValueId::Reflect => "reflect",
ValueId::Repeat => "repeat",
ValueId::ResetSize => "reset-size",
ValueId::Rl => "rl",
ValueId::RlTb => "rl-tb",
ValueId::Round => "round",
ValueId::Rtl => "rtl",
ValueId::RunIn => "run-in",
ValueId::SResize => "s-resize",
ValueId::Scroll => "scroll",
ValueId::SeResize => "se-resize",
ValueId::SemiCondensed => "semi-condensed",
ValueId::SemiExpanded => "semi-expanded",
ValueId::Small => "small",
ValueId::SmallCaps => "small-caps",
ValueId::Smaller => "smaller",
ValueId::Square => "square",
ValueId::SRGB => "sRGB",
ValueId::Start => "start",
ValueId::Stroke => "stroke",
ValueId::Sub => "sub",
ValueId::Super => "super",
ValueId::SwResize => "sw-resize",
ValueId::Table => "table",
ValueId::TableCaption => "table-caption",
ValueId::TableCell => "table-cell",
ValueId::TableColumn => "table-column",
ValueId::TableColumnGroup => "table-column-group",
ValueId::TableFooterGroup => "table-footer-group",
ValueId::TableHeaderGroup => "table-header-group",
ValueId::TableRow => "table-row",
ValueId::TableRowGroup => "table-row-group",
ValueId::Tb => "tb",
ValueId::TbRl => "tb-rl",
ValueId::Text => "text",
ValueId::TextAfterEdge => "text-after-edge",
ValueId::TextBeforeEdge => "text-before-edge",
ValueId::UltraCondensed => "ultra-condensed",
ValueId::UltraExpanded => "ultra-expanded",
ValueId::Underline => "underline",
ValueId::UseScript => "use-script",
ValueId::UserSpaceOnUse => "userSpaceOnUse",
ValueId::Visible => "visible",
ValueId::VisibleFill => "visibleFill",
ValueId::VisiblePainted => "visiblePainted",
ValueId::VisibleStroke => "visibleStroke",
ValueId::WResize => "w-resize",
ValueId::Wait => "wait",
ValueId::Wider => "wider",
ValueId::XLarge => "x-large",
ValueId::XSmall => "x-small",
ValueId::XxLarge => "xx-large",
ValueId::XxSmall => "xx-small",
}
}
}
impl fmt::Debug for ValueId {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.name())
}
}
impl fmt::Display for ValueId {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.name())
}
}