pub enum ScopeKind {
Main,
Function,
Class,
Loop,
Block,
}Expand description
Kind of a scope block (determines what can be declared and how lookup works).
Variants§
Main
Root/main block: holds globals, user functions, classes.
Function
Function or method body.
Class
Class body (for method/constructor scope we use Function with class context if needed).
Loop
Loop body (for break/continue validation).
Block
Plain block { ... }.
Trait Implementations§
impl Copy for ScopeKind
impl Eq for ScopeKind
impl StructuralPartialEq for ScopeKind
Auto Trait Implementations§
impl Freeze for ScopeKind
impl RefUnwindSafe for ScopeKind
impl Send for ScopeKind
impl Sync for ScopeKind
impl Unpin for ScopeKind
impl UnsafeUnpin for ScopeKind
impl UnwindSafe for ScopeKind
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