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>

source

pub fn documentation(self) -> Option<&'db str>

The enum documentation

source

pub fn name(self) -> &'db str

The name of the value.

source

pub fn database_name(self) -> &'db str

The database name of the enum.

source

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")
}