pub struct NamespaceDef {
    pub imports: Vec<PosString>,
    pub components: Vec<ComponentDef>,
    pub externs: Vec<(Option<PosString>, Vec<Primitive>)>,
    pub metadata: Option<String>,
}
Expand description

Corresponds to an individual Calyx file.

Fields

imports: Vec<PosString>

Path to extern files.

components: Vec<ComponentDef>

List of component definitions.

externs: Vec<(Option<PosString>, Vec<Primitive>)>

Extern statements and any primitive declarations in them.

metadata: Option<String>

Optional opaque metadata

Implementations

Construct a namespace from a file or the input stream. If no file is provided, the input stream must be a TTY.

Construct a namespace from a definition using a string.

Trait Implementations

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.