Struct kailua_env::scope::ScopeMap
[−]
[src]
pub struct ScopeMap<Name: Clone + Hash + Eq> { /* fields omitted */ }
A mapping from the position to the innermost scope containing it. Also manages the names in each scope.
Methods
impl<Name: Clone + Hash + Eq + Debug> ScopeMap<Name>
[src]
fn new() -> ScopeMap<Name>
fn generate_root(&mut self) -> Scope
fn generate(&mut self, parent: Scope) -> Scope
fn set_span(&mut self, scope: Spanned<Scope>)
fn add_name(&mut self, scope: Scope, name: Name) -> ScopedId
fn parent_scope(&self, scope: Scope) -> Option<Scope>
fn all_scopes<'a>(&'a self) -> AllScopes<'a, Name>
fn ancestor_scopes<'a>(&'a self, scope: Scope) -> AncestorScopes<'a, Name>
fn names<'a>(&'a self, scope: Scope) -> Names<'a, Name>
fn names_and_scopes<'a>(&'a self, scope: Scope) -> NamesAndScopes<'a, Name>
fn find_id<'a>(&'a self, scoped_id: &ScopedId) -> (&'a Name, Scope)
fn find_id_with_index<'a>(&'a self, id: usize) -> Option<(&'a Name, Scope)>
fn find_name_in_scope<T: ?Sized>(
&self,
scope: Scope,
name: &T
) -> Option<(Scope, ScopedId)> where
Name: Borrow<T>,
Name: From<&'a T>,
T: Hash + Eq,
&self,
scope: Scope,
name: &T
) -> Option<(Scope, ScopedId)> where
Name: Borrow<T>,
Name: From<&'a T>,
T: Hash + Eq,
fn scope_from_pos(&self, pos: Pos) -> Option<Scope>
Trait Implementations
impl<Name: Debug + Clone + Hash + Eq> Debug for ScopeMap<Name>
[src]
impl<Name: Clone + Clone + Hash + Eq> Clone for ScopeMap<Name>
[src]
fn clone(&self) -> ScopeMap<Name>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more