[−][src]Struct moore_vhdl::scope2::ScopeData
A scope.
Fields
parent: Option<&'t ScopeData<'t>>
The parent scope.
defs: RefCell<HashMap<ResolvableName, Vec<Spanned<Def2<'t>>>>>
The definitions made in this scope.
imported_defs: RefCell<HashMap<ResolvableName, Vec<Spanned<Def2<'t>>>>>
The definitions imported from other scopes.
imported_scopes: RefCell<HashSet<&'t ScopeData<'t>>>
The explicitly imported scopes.
Methods
impl<'t> ScopeData<'t>
[src]
pub fn root() -> ScopeData<'t>
[src]
Create a new root scope.
pub fn new(parent: &'t ScopeData<'t>) -> ScopeData<'t>
[src]
Create a new scope.
pub fn define(
&self,
name: Spanned<ResolvableName>,
def: Def2<'t>,
ctx: &dyn SessionContext
) -> Result<()>
[src]
&self,
name: Spanned<ResolvableName>,
def: Def2<'t>,
ctx: &dyn SessionContext
) -> Result<()>
Define a new name in the scope.
pub fn import_def(
&self,
name: ResolvableName,
def: Spanned<Def2<'t>>
) -> Result<()>
[src]
&self,
name: ResolvableName,
def: Spanned<Def2<'t>>
) -> Result<()>
Import a definition into the scope.
pub fn import_scope(&self, scope: &'t ScopeData<'t>) -> Result<()>
[src]
Import an entire scope into the scope.
pub fn resolve(
&self,
name: ResolvableName,
recur: bool
) -> Vec<Spanned<Def2<'t>>>
[src]
&self,
name: ResolvableName,
recur: bool
) -> Vec<Spanned<Def2<'t>>>
Find a name in this scope.
This only searches this scope and does not proceed to parent or child scopes. Use a dedicated name resolver for that.
Trait Implementations
impl<'a, 't> Alloc<'a, 'a, ScopeData<'t>> for Arenas2<'t> where
't: 'a,
[src]
't: 'a,
impl<'t> ScopeSpecificTermContext<'t, &'t ScopeData<'t>, Def2<'t>> for TermContext<AllocContext<'t>, &'t ScopeData<'t>, Def2<'t>>
[src]
fn termify_name_in_scope(
&self,
name: Spanned<ResolvableName>,
scope: &'t ScopeData<'t>
) -> Result<Spanned<Term<'t>>>
[src]
&self,
name: Spanned<ResolvableName>,
scope: &'t ScopeData<'t>
) -> Result<Spanned<Term<'t>>>
Map a resolvable name to a term, resolving it within a scope.
fn maybe_selectable_scope(&self, term: &Term<'t>) -> Option<&'t ScopeData<'t>>
[src]
impl<'t> Clone for ScopeData<'t>
[src]
impl<'t> Eq for &'t ScopeData<'t>
[src]
impl<'t> PartialEq<&'t ScopeData<'t>> for &'t ScopeData<'t>
[src]
impl<'t> Debug for ScopeData<'t>
[src]
impl<'t> Hash for &'t ScopeData<'t>
[src]
Auto Trait Implementations
impl<'t> !Send for ScopeData<'t>
impl<'t> !Sync for ScopeData<'t>
impl<'t> Unpin for ScopeData<'t>
impl<'t> !UnwindSafe for ScopeData<'t>
impl<'t> !RefUnwindSafe for ScopeData<'t>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,