[][src]Struct gluon_base::resolve::AliasRemover

pub struct AliasRemover<T> {
    pub named_variables: FnvMap<Symbol, T>,
    // some fields omitted
}

Fields

named_variables: FnvMap<Symbol, T>

Implementations

impl<T> AliasRemover<T>[src]

pub fn new() -> Self[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn reset(&mut self, to: usize)[src]

pub fn clear(&mut self)[src]

impl<T> AliasRemover<T> where
    T: TypeExt<Id = Symbol, SpannedId = Symbol> + Clone + Display,
    T::Types: Clone + Default + Extend<T> + FromIterator<T>,
    T::Generics: Clone + FromIterator<Generic<Symbol>>,
    T::Fields: Clone
[src]

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> where
    F: FnMut(&AliasRef<Symbol, T>) -> bool
[src]

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>
[src]

pub fn remove_aliases(
    &mut self,
    env: &dyn TypeEnv<Type = T>,
    interner: &mut impl TypeContext<Symbol, T>,
    typ: T
) -> Result<T, Error>
[src]

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>
[src]

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>
[src]

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>
[src]

Trait Implementations

impl<T: Debug> Debug for AliasRemover<T>[src]

impl<T> Default for AliasRemover<T>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Id> AsId<Id> for Id where
    Id: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.