Type Alias parser_database::walkers::EnumWalker
source · pub type EnumWalker<'db> = Walker<'db, EnumId>;
Expand description
An enum
declaration in the schema.
Aliased Type§
struct EnumWalker<'db> {
pub db: &'db ParserDatabase,
pub id: EnumId,
}
Fields§
§db: &'db ParserDatabase
The parser database being traversed.
id: EnumId
The identifier of the focused element.
Implementations§
source§impl<'db> EnumWalker<'db>
impl<'db> EnumWalker<'db>
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 enum:
ⓘ
enum Colour {
RED
GREEN
BLUE
@@map("Color")
^^^^^^^
}
sourcepub fn values(self) -> impl ExactSizeIterator<Item = EnumValueWalker<'db>>
pub fn values(self) -> impl ExactSizeIterator<Item = EnumValueWalker<'db>>
The values of the enum.
sourcepub fn indentation(self) -> IndentationType
pub fn indentation(self) -> IndentationType
How fields are indented in the enum.
sourcepub fn newline(self) -> NewlineType
pub fn newline(self) -> NewlineType
What kind of newlines the enum uses.