pub struct Scope<'a>(/* private fields */);
Implementations§
source§impl<'a> Scope<'a>
impl<'a> Scope<'a>
pub fn new( session: &'a Session, symbol_generator: SymbolGenerator, parent: Option<Scope<'a>>, typ: ScopeType ) -> Scope<'a>
pub fn parent(self) -> Option<Scope<'a>>
pub fn typ(self) -> ScopeType
pub fn create_child_scope( self, session: &'a Session, typ: ScopeType ) -> Scope<'a>
pub fn find_self_or_ancestor<F: Fn(ScopeType) -> bool>( self, pred: F ) -> Option<Scope<'a>>
pub fn find_furthest_self_or_ancestor<F: Fn(ScopeType) -> bool>( self, pred: F ) -> Option<Scope<'a>>
pub fn flags(self) -> Ref<'a, Flags<ScopeFlag>>
pub fn flags_mut(self) -> RefMut<'a, Flags<ScopeFlag>>
pub fn add_symbol(self, identifier: Identifier<'a>) -> SyntaxResult<'a, ()>
pub fn add_block_symbol( self, identifier: Identifier<'a> ) -> SyntaxResult<'a, ()>
pub fn get_symbol(self, identifier: Identifier<'a>) -> Option<Symbol>
pub fn find_symbol_with_scope( self, identifier: Identifier<'a> ) -> Option<(Scope<'a>, Symbol)>
pub fn find_symbol(self, identifier: Identifier<'a>) -> Option<Symbol>
pub fn find_symbol_up_to_nearest_scope_of_type<'b>( self, identifier: Identifier<'a>, scope_type: ScopeType ) -> Option<Symbol>
pub fn symbol_count(self) -> usize
pub fn symbol_names<'b>(self) -> Ref<'b, SessionVec<'a, SourceRange<'a>>>
pub fn children<'b>(self) -> Ref<'b, SessionVec<'a, Scope<'a>>>
Trait Implementations§
source§impl<'a> PartialEq for Scope<'a>
impl<'a> PartialEq for Scope<'a>
impl<'a> Copy for Scope<'a>
impl<'a> Eq for Scope<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Scope<'a>
impl<'a> !Send for Scope<'a>
impl<'a> !Sync for Scope<'a>
impl<'a> Unpin for Scope<'a>
impl<'a> !UnwindSafe for Scope<'a>
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