Type Alias parser_database::walkers::CompositeTypeWalker
source · pub type CompositeTypeWalker<'db> = Walker<'db, CompositeTypeId>;
Expand description
A composite type, introduced with the type
keyword in the schema.
Example:
type Address {
name String
streetName String
streetNumber Int
city String
zipCode Int
countryCode String
}
Aliased Type§
struct CompositeTypeWalker<'db> {
pub db: &'db ParserDatabase,
pub id: CompositeTypeId,
}
Fields§
§db: &'db ParserDatabase
The parser database being traversed.
id: CompositeTypeId
The identifier of the focused element.
Implementations§
source§impl<'db> CompositeTypeWalker<'db>
impl<'db> CompositeTypeWalker<'db>
sourcepub fn composite_type_id(self) -> CompositeTypeId
pub fn composite_type_id(self) -> CompositeTypeId
The ID of the composite type node in the AST.
sourcepub fn ast_composite_type(self) -> &'db CompositeType
pub fn ast_composite_type(self) -> &'db CompositeType
The composite type node in the AST.
sourcepub fn fields(
self
) -> impl ExactSizeIterator<Item = CompositeTypeFieldWalker<'db>> + Clone
pub fn fields( self ) -> impl ExactSizeIterator<Item = CompositeTypeFieldWalker<'db>> + Clone
Iterator over all the fields of the composite type.