Type Alias parser_database::walkers::EnumValueWalker
source · pub type EnumValueWalker<'db> = Walker<'db, (EnumId, usize)>;
Expand description
One value in an enum
declaration in the schema.
Aliased Type§
struct EnumValueWalker<'db> {
pub db: &'db ParserDatabase,
pub id: (EnumId, usize),
}
Fields§
§db: &'db ParserDatabase
The parser database being traversed.
id: (EnumId, usize)
The identifier of the focused element.
Implementations§
source§impl<'db> EnumValueWalker<'db>
impl<'db> EnumValueWalker<'db>
sourcepub fn documentation(self) -> Option<&'db str>
pub fn documentation(self) -> Option<&'db str>
The enum documentation
sourcepub fn database_name(self) -> &'db str
pub fn database_name(self) -> &'db str
The database name of the enum.
sourcepub fn mapped_name(self) -> Option<&'db str>
pub fn mapped_name(self) -> Option<&'db str>
The mapped name of the value:
ⓘ
enum Colour {
RED @map("scarlet")
GREEN @map("salad")
^^^^^^^
BLUE @map("schmurf")
}