pub struct FuncDef {
pub id: FuncId,
pub name: String,
pub params: Vec<ParamDef>,
pub returns: Type,
pub effects: Vec<Effect>,
pub body: Node,
}Expand description
A function definition.
Fields§
§id: FuncIdFunction ID (unique within the module).
name: StringFunction name (used for calls and exports).
params: Vec<ParamDef>Parameter list.
returns: TypeReturn type.
effects: Vec<Effect>Declared effects this function may have.
body: NodeThe function body (an IR node tree).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FuncDef
impl<'de> Deserialize<'de> for FuncDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for FuncDef
Auto Trait Implementations§
impl Freeze for FuncDef
impl RefUnwindSafe for FuncDef
impl Send for FuncDef
impl Sync for FuncDef
impl Unpin for FuncDef
impl UnsafeUnpin for FuncDef
impl UnwindSafe for FuncDef
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