pub struct Function {
pub id: HirId,
pub name: Symbol,
pub params: Vec<Param>,
pub return_ty: Ty,
pub body: Block,
pub is_extern: bool,
pub is_async: bool,
pub is_const: bool,
pub energy: EnergyMetadata,
pub attributes: FunctionAttributes,
pub span: Span,
}Expand description
Function definition (with resolved types)
Fields§
§id: HirId§name: Symbol§params: Vec<Param>§return_ty: Ty§body: Block§is_extern: boolWhether this is an extern function declaration (no body)
is_async: boolWhether this is an async function (async fn)
is_const: boolWhether this is a const function (const fn)
energy: EnergyMetadataEnergy metadata including budget constraints and compile-time estimates
attributes: FunctionAttributesParsed function attributes for code generation
span: SpanTrait Implementations§
Auto Trait Implementations§
impl Freeze for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
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