pub struct FunctionDef<'a> {
pub params: Vec<&'a str>,
pub body: FuncBody<'a>,
pub closure: WeakEnv<'a>,
pub defined_in_root: bool,
}Fields§
§params: Vec<&'a str>§body: FuncBody<'a>§closure: WeakEnv<'a>Lexical closure (SPEC §4.2). A WeakEnv to avoid the env<->function
Arc cycle; the interpreter’s env arena keeps the target env alive.
defined_in_root: boolD1xD12: the function runs with the capabilities of its origin module, not the caller’s - an exported package function does not gain the root’s rights.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for FunctionDef<'a>
impl<'a> !Send for FunctionDef<'a>
impl<'a> !Sync for FunctionDef<'a>
impl<'a> !UnwindSafe for FunctionDef<'a>
impl<'a> Freeze for FunctionDef<'a>
impl<'a> Unpin for FunctionDef<'a>
impl<'a> UnsafeUnpin for FunctionDef<'a>
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