pub type FieldWalker<'db> = Walker<'db, (ModelId, FieldId)>;
Expand description

A model field, scalar or relation.

Aliased Type§

struct FieldWalker<'db> {
    pub db: &'db ParserDatabase,
    pub id: (ModelId, FieldId),
}

Fields§

§db: &'db ParserDatabase

The parser database being traversed.

§id: (ModelId, FieldId)

The identifier of the focused element.

Implementations§

source§

impl<'db> FieldWalker<'db>

source

pub fn ast_field(self) -> &'db Field

The AST node for the field.

source

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

The field name.

source

pub fn model(self) -> ModelWalker<'db>

Traverse the field’s parent model.

source

pub fn refine(self) -> RefinedFieldWalker<'db>

Find out which kind of field this is.

Trait Implementations§

source§

impl<'db> From<Walker<'db, RelationFieldId>> for FieldWalker<'db>

source§

fn from(w: RelationFieldWalker<'db>) -> Self

Converts to this type from the input type.
source§

impl<'db> From<Walker<'db, ScalarFieldId>> for FieldWalker<'db>

source§

fn from(w: ScalarFieldWalker<'db>) -> Self

Converts to this type from the input type.