pub struct ClosureVar {
pub name: String,
pub is_const: bool,
pub is_lexical: bool,
pub closure_type: ClosureType,
pub var_idx: u16,
}Expand description
One captured variable of a function.
Fields§
§name: StringThe name, as written in the enclosing function.
is_const: boolWhether the captured binding is immutable.
is_lexical: boolWhether the captured binding is block-scoped.
closure_type: ClosureTypeHow the closure reaches it.
var_idx: u16Index into the parent’s locals, arguments or reference cells.
Trait Implementations§
Source§impl Clone for ClosureVar
impl Clone for ClosureVar
Source§impl Debug for ClosureVar
impl Debug for ClosureVar
impl Eq for ClosureVar
Source§impl PartialEq for ClosureVar
impl PartialEq for ClosureVar
impl StructuralPartialEq for ClosureVar
Auto Trait Implementations§
impl Forget for ClosureVar
impl Freeze for ClosureVar
impl Move for ClosureVar
impl RefUnwindSafe for ClosureVar
impl Send for ClosureVarwhere
RawVecInner: Send,
impl Sync for ClosureVarwhere
RawVecInner: Sync,
impl Unpin for ClosureVar
impl UnsafeUnpin for ClosureVar
impl UnwindSafe for ClosureVarwhere
RawVecInner: UnwindSafe,
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