pub struct ModuleDef {
pub name: String,
pub params: Vec<TypedParam>,
pub outputs: Vec<TypedParam>,
pub body: Vec<Statement>,
pub span: Span,
}Expand description
A formal module definition with typed interface.
hash_range(input: u64, max: u64) -> (value: u64) := {
h := hash(input)
value := mod(h, max)
}Fields§
§name: StringThe module’s name.
params: Vec<TypedParam>The typed inputs, in signature order.
outputs: Vec<TypedParam>The typed outputs, in signature order.
body: Vec<Statement>The module body.
span: SpanWhere the definition appears.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModuleDef
impl RefUnwindSafe for ModuleDef
impl Send for ModuleDef
impl Sync for ModuleDef
impl Unpin for ModuleDef
impl UnsafeUnpin for ModuleDef
impl UnwindSafe for ModuleDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more