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>

source

pub fn composite_type_id(self) -> CompositeTypeId

The ID of the composite type node in the AST.

source

pub fn ast_composite_type(self) -> &'db CompositeType

The composite type node in the AST.

source

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

The name of the composite type in the schema.

source

pub fn fields( self ) -> impl ExactSizeIterator<Item = CompositeTypeFieldWalker<'db>> + Clone

Iterator over all the fields of the composite type.