pub struct Scope { /* private fields */ }Expand description
One immutable lexical scope with its two-namespace symbol tables.
Implementations§
Source§impl Scope
impl Scope
pub const fn kind(&self) -> ScopeKind
pub const fn parent(&self) -> Option<ScopeId>
Sourcepub fn value(&self, name: &str) -> Option<SymbolId>
pub fn value(&self, name: &str) -> Option<SymbolId>
Returns the value binding declared directly in this scope, if any.
Sourcepub fn type_binding(&self, name: &str) -> Option<SymbolId>
pub fn type_binding(&self, name: &str) -> Option<SymbolId>
Returns the type binding declared directly in this scope, if any.
Trait Implementations§
impl Eq for Scope
impl StructuralPartialEq for Scope
Auto Trait Implementations§
impl Freeze for Scope
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnsafeUnpin for Scope
impl UnwindSafe for Scope
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