pub enum ModuleScope {
Isolated,
Lexical,
}Expand description
Whether a nested module sees the names of the modules around it.
§Examples
use resolve_lang::{ModuleScope, Policy};
assert_eq!(Policy::kraken().module_scope(), ModuleScope::Isolated);Variants§
Isolated
A nested module starts a fresh lexical world: outer items are reached
through super:: or an import (Rust, Kraken).
Lexical
A nested module sees enclosing scopes’ names (PHP namespaces falling back outward, languages with lexically nested modules).
Trait Implementations§
Source§impl Clone for ModuleScope
impl Clone for ModuleScope
impl Copy for ModuleScope
Source§impl Debug for ModuleScope
impl Debug for ModuleScope
impl Eq for ModuleScope
Source§impl Hash for ModuleScope
impl Hash for ModuleScope
Source§impl PartialEq for ModuleScope
impl PartialEq for ModuleScope
impl StructuralPartialEq for ModuleScope
Auto Trait Implementations§
impl Freeze for ModuleScope
impl RefUnwindSafe for ModuleScope
impl Send for ModuleScope
impl Sync for ModuleScope
impl Unpin for ModuleScope
impl UnsafeUnpin for ModuleScope
impl UnwindSafe for ModuleScope
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