pub enum AbstractDecl<'a, 'f> {
    Const {
        name: Spanned<'f, Ident<'a, 'f>>,
        ty: Spanned<'f, TyExpr<'a, 'f>>,
        def: Option<Spanned<'f, Expr<'a, 'f>>>,
    },
    Ty {
        name: Spanned<'f, Ident<'a, 'f>>,
        value: Spanned<'f, TyDecl<'a, 'f>>,
    },
    Node {
        is_unsafe: bool,
        is_function: bool,
        name: Spanned<'f, Ident<'a, 'f>>,
        static_params: Vec<Spanned<'f, StaticParamDecl<'a, 'f>>>,
        params: Vec<Spanned<'f, VariableDecl<'a, 'f>>>,
        outputs: Vec<Spanned<'f, VariableDecl<'a, 'f>>>,
    },
}
Expand description

Abstract declarations, used in models

Variants

Const

Fields

name: Spanned<'f, Ident<'a, 'f>>

Its name

ty: Spanned<'f, TyExpr<'a, 'f>>

Its type

def: Option<Spanned<'f, Expr<'a, 'f>>>

A value, if defined

Constant

Ty

Fields

name: Spanned<'f, Ident<'a, 'f>>

Its name

value: Spanned<'f, TyDecl<'a, 'f>>

Its definition

Type

Node

Fields

is_unsafe: bool

Is it unsafe

is_function: bool

Is it a functional node

name: Spanned<'f, Ident<'a, 'f>>

Its name

static_params: Vec<Spanned<'f, StaticParamDecl<'a, 'f>>>

Its static parameters

params: Vec<Spanned<'f, VariableDecl<'a, 'f>>>

Its dynamic parameters

outputs: Vec<Spanned<'f, VariableDecl<'a, 'f>>>

Its outputs

Node

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

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.

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)

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.