pub enum ClosureType {
Local,
Arg,
Ref,
GlobalRef,
GlobalDecl,
Global,
ModuleDecl,
ModuleImport,
}Expand description
Where a captured variable actually lives, and therefore how a closure reaches it.
Variants§
Local
A local of the parent function ([loc<n>]).
Arg
An argument of the parent function ([arg<n>]).
Ref
A reference cell in the parent function ([ref<n>]).
GlobalRef
A global, reached through the reference table by index.
GlobalDecl
A global declared in this script.
Global
A global reached by name.
ModuleDecl
A module-level declaration.
ModuleImport
A module import binding.
Implementations§
Trait Implementations§
Source§impl Clone for ClosureType
impl Clone for ClosureType
impl Copy for ClosureType
Source§impl Debug for ClosureType
impl Debug for ClosureType
impl Eq for ClosureType
Source§impl PartialEq for ClosureType
impl PartialEq for ClosureType
impl StructuralPartialEq for ClosureType
Auto Trait Implementations§
impl Forget for ClosureType
impl Freeze for ClosureType
impl Move for ClosureType
impl RefUnwindSafe for ClosureType
impl Send for ClosureType
impl Sync for ClosureType
impl Unpin for ClosureType
impl UnsafeUnpin for ClosureType
impl UnwindSafe for ClosureType
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