Enum espr::ir::TypeRef[][src]

pub enum TypeRef {
    SimpleType(SimpleType),
    Named {
        name: String,
        scope: Scope,
        is_simple: bool,
        is_enumerate: bool,
    },
    Entity {
        name: String,
        scope: Scope,
        is_supertype: bool,
    },
    Set {
        base: Box<TypeRef>,
        bound: Option<Bound>,
    },
    List {
        base: Box<TypeRef>,
        bound: Option<Bound>,
        unique: bool,
    },
}

Variants

SimpleType(SimpleType)

Tuple Fields of SimpleType

0: SimpleType
Named

Fields of Named

name: Stringscope: Scope

Scope where the named type is declared

is_simple: bool

True if the underlying type of named type is a simple type:

TYPE a = INTEGER; ENDTYPE;
TYPE b = a; ENDTYPE;

Then both a and b are simple.

is_enumerate: bool

Enumeration, declared by TYPE a = ENUMERATION OF (..); END_TYPE;.

Entity

Fields of Entity

name: Stringscope: Scopeis_supertype: bool
Set

Fields of Set

base: Box<TypeRef>bound: Option<Bound>
List

Fields of List

base: Box<TypeRef>bound: Option<Bound>unique: bool

Implementations

Returns true iff self is:

  • a simple type,
  • a named type whose underlying type is simple, or,
  • a set or list of a type x such that x.is_simple() == true.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

AST portion

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Write self to the given TokenStream. Read more

Convert self directly into a TokenStream object. Read more

Convert self directly into a TokenStream object. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Returns a Span covering the complete contents of this syntax tree node, or Span::call_site() if this node is empty. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.