Struct gluon_base::resolve::AliasRemover
source · pub struct AliasRemover<T> {
pub named_variables: FnvMap<Symbol, T>,
/* private fields */
}
Fields§
§named_variables: FnvMap<Symbol, T>
Implementations§
source§impl<T> AliasRemover<T>
impl<T> AliasRemover<T>
source§impl<T> AliasRemover<T>
impl<T> AliasRemover<T>
pub fn canonical_alias<'t, F>( &mut self, env: &(dyn TypeEnv<Type = T> + '_), interner: &mut impl TypeContext<Symbol, T>, typ: &'t T, canonical: F ) -> Result<Cow<'t, T>, Error>
pub fn remove_aliases_to_concrete<'a>( &mut self, env: &(dyn TypeEnv<Type = T> + '_), interner: &mut impl TypeContext<Symbol, T>, typ: T ) -> Result<T, Error>
pub fn remove_aliases( &mut self, env: &(dyn TypeEnv<Type = T> + '_), interner: &mut impl TypeContext<Symbol, T>, typ: T ) -> Result<T, Error>
pub fn remove_aliases_predicate( &mut self, env: &(dyn TypeEnv<Type = T> + '_), interner: &mut impl TypeContext<Symbol, T>, typ: T, predicate: impl FnMut(&AliasData<Symbol, T>) -> bool ) -> Result<T, Error>
pub fn remove_alias( &mut self, env: &(dyn TypeEnv<Type = T> + '_), interner: &mut impl TypeContext<Symbol, T>, typ: &T, predicate: impl FnOnce(&AliasData<Symbol, T>) -> bool ) -> Result<Option<T>, Error>
pub fn remove_alias_to_concrete<'a>( &mut self, env: &'a (dyn TypeEnv<Type = T> + '_), interner: &mut impl TypeContext<Symbol, T>, typ: &'a T, predicate: impl FnOnce(&AliasData<Symbol, T>) -> bool ) -> Result<Option<(T, Cow<'a, [T]>)>, Error>
Trait Implementations§
source§impl<T: Debug> Debug for AliasRemover<T>
impl<T: Debug> Debug for AliasRemover<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for AliasRemover<T>where
T: RefUnwindSafe,
impl<T> Send for AliasRemover<T>where
T: Send,
impl<T> Sync for AliasRemover<T>where
T: Sync,
impl<T> Unpin for AliasRemover<T>where
T: Unpin,
impl<T> UnwindSafe for AliasRemover<T>where
T: UnwindSafe,
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