pub struct NarrowingCache {
pub resolve_cache: RefCell<FxHashMap<TypeId, TypeId>>,
pub property_cache: RefCell<FxHashMap<(TypeId, Atom), Option<TypeId>>>,
}Expand description
Narrowing context for type guards and control flow analysis. Shared across multiple narrowing contexts to persist resolution results.
Fields§
§resolve_cache: RefCell<FxHashMap<TypeId, TypeId>>Cache for type resolution (Lazy/App/Template -> Structural)
property_cache: RefCell<FxHashMap<(TypeId, Atom), Option<TypeId>>>Cache for top-level property type lookups (TypeId, PropName) -> PropType
Implementations§
Trait Implementations§
Source§impl Clone for NarrowingCache
impl Clone for NarrowingCache
Source§fn clone(&self) -> NarrowingCache
fn clone(&self) -> NarrowingCache
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NarrowingCache
impl Debug for NarrowingCache
Source§impl Default for NarrowingCache
impl Default for NarrowingCache
Source§fn default() -> NarrowingCache
fn default() -> NarrowingCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for NarrowingCache
impl !RefUnwindSafe for NarrowingCache
impl Send for NarrowingCache
impl !Sync for NarrowingCache
impl Unpin for NarrowingCache
impl UnsafeUnpin for NarrowingCache
impl UnwindSafe for NarrowingCache
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