Struct cairo_lang_semantic::resolve::scope::Scope
source · pub struct Scope {
pub generic_items: OrderedHashMap<SmolStr, ResolvedGenericItem>,
pub concrete_items: OrderedHashMap<SmolStr, ResolvedConcreteItem>,
pub parent: Option<Arc<Scope>>,
}
Expand description
A scope of resolved items. Scopes define a hierarchy of resolved items, for later lookup. A lookup of an item starts at a specific scope, and falls back to the parent scope.
Fields§
§generic_items: OrderedHashMap<SmolStr, ResolvedGenericItem>
§concrete_items: OrderedHashMap<SmolStr, ResolvedConcreteItem>
§parent: Option<Arc<Scope>>
Trait Implementations§
source§impl<'a, T: ?Sized + Upcast<dyn SemanticGroup + 'a>> DebugWithDb<T> for Scope
impl<'a, T: ?Sized + Upcast<dyn SemanticGroup + 'a>> DebugWithDb<T> for Scope
source§impl PartialEq<Scope> for Scope
impl PartialEq<Scope> for Scope
impl Eq for Scope
impl StructuralEq for Scope
impl StructuralPartialEq for Scope
Auto Trait Implementations§
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin 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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.