pub enum BodyMode {
Start,
Entry,
}Expand description
What the module body (Module.body) compiles to.
§Examples
use bcgen_lang::BodyMode;
assert_eq!(BodyMode::default(), BodyMode::Start);Variants§
Start
The body is part of the module’s start function, which the VM runs once before the first call into the module; its value is kept in a global that the entry function returns. Scripts and modules.
Entry
The body is the entry function itself and returns its value on every call; the start function only initializes globals. REPL entries and tests that run the body more than once.
Trait Implementations§
impl Copy for BodyMode
impl Eq for BodyMode
impl StructuralPartialEq for BodyMode
Auto Trait Implementations§
impl Freeze for BodyMode
impl RefUnwindSafe for BodyMode
impl Send for BodyMode
impl Sync for BodyMode
impl Unpin for BodyMode
impl UnsafeUnpin for BodyMode
impl UnwindSafe for BodyMode
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