Trait gluon_base::types::TypeEnv

source ·
pub trait TypeEnv: KindEnv {
    type Type;

    // Required methods
    fn find_type(&self, id: &SymbolRef) -> Option<Self::Type>;
    fn find_type_info(
        &self,
        id: &SymbolRef
    ) -> Option<Alias<Symbol, Self::Type>>;
}
Expand description

Trait for values which contains typed values which can be refered by name

Required Associated Types§

Required Methods§

source

fn find_type(&self, id: &SymbolRef) -> Option<Self::Type>

Returns the type of the value bound at id

source

fn find_type_info(&self, id: &SymbolRef) -> Option<Alias<Symbol, Self::Type>>

Returns information about the type id

Implementations on Foreign Types§

source§

impl<'a, T: ?Sized + TypeEnv> TypeEnv for &'a T

§

type Type = <T as TypeEnv>::Type

source§

fn find_type(&self, id: &SymbolRef) -> Option<Self::Type>

source§

fn find_type_info(&self, id: &SymbolRef) -> Option<Alias<Symbol, Self::Type>>

Implementors§