Skip to main content

Module decl

Module decl 

Source
Available on crate feature ast-models only.
Expand description

Abstract syntax trees related to declarations (items) in source code.

Modules§

constant
Constant declarations, such as const MAX: u8 = 255;.
enumeration
Enum declarations, such as enum Color { Red, Green, Blue }.
function
Function declarations, such as func add(a: u8, b: u8) -> u8 { a + b }.
implementation
Implementation blocks, such as impl Point { func origin() -> Point { ... } }.
import
Import declarations.
module
Module declarations, such as mod math; or mod math { ... }.
record
Record declarations, such as record Point { x: i32, y: i32 }.
type_alias
Type alias declarations in wright source code.
union
Tagged union declarations, such as union Shape { circle: Circle | square: Square | none }.

Structs§

Item
A declaration, such as a function, record, or import, along with its documentation.

Enums§

ItemKind
The different kinds of Items.
Visibility
The visibility of an Item or record field.