pub struct Env<C: Ctx, E: UserEvent> {
pub by_id: MapS<BindId, Bind>,
pub lambdas: MapS<LambdaId, Weak<LambdaDef<C, E>>>,
pub binds: MapS<ModPath, MapS<CompactString, BindId>>,
pub used: MapS<ModPath, Arc<Vec<ModPath>>>,
pub modules: SetS<ModPath>,
pub typedefs: MapS<ModPath, MapS<CompactString, TypeDef>>,
}
Fields§
§by_id: MapS<BindId, Bind>
§lambdas: MapS<LambdaId, Weak<LambdaDef<C, E>>>
§binds: MapS<ModPath, MapS<CompactString, BindId>>
§used: MapS<ModPath, Arc<Vec<ModPath>>>
§modules: SetS<ModPath>
§typedefs: MapS<ModPath, MapS<CompactString, TypeDef>>
Implementations§
Source§impl<C: Ctx, E: UserEvent> Env<C, E>
impl<C: Ctx, E: UserEvent> Env<C, E>
pub fn find_visible<R, F: FnMut(&str, &str) -> Option<R>>( &self, scope: &ModPath, name: &ModPath, f: F, ) -> Option<R>
pub fn lookup_bind( &self, scope: &ModPath, name: &ModPath, ) -> Option<(&ModPath, &Bind)>
pub fn lookup_typedef( &self, scope: &ModPath, name: &ModPath, ) -> Option<&TypeDef>
Sourcepub fn lookup_matching(
&self,
scope: &ModPath,
part: &ModPath,
) -> Vec<(CompactString, BindId)>
pub fn lookup_matching( &self, scope: &ModPath, part: &ModPath, ) -> Vec<(CompactString, BindId)>
lookup binds in scope that match the specified partial name. This is intended to be used for IDEs and interactive shells, and is not used by the compiler.
Sourcepub fn lookup_matching_modules(
&self,
scope: &ModPath,
part: &ModPath,
) -> Vec<ModPath>
pub fn lookup_matching_modules( &self, scope: &ModPath, part: &ModPath, ) -> Vec<ModPath>
lookup modules in scope that match the specified partial name. This is intended to be used for IDEs and interactive shells, and is not used by the compiler.
pub fn canonical_modpath( &self, scope: &ModPath, name: &ModPath, ) -> Option<ModPath>
pub fn deftype( &mut self, scope: &ModPath, name: &str, params: Arc<[(TVar, Option<Type>)]>, typ: Type, ) -> Result<()>
pub fn undeftype(&mut self, scope: &ModPath, name: &str)
pub fn bind_variable( &mut self, scope: &ModPath, name: &str, typ: Type, ) -> &mut Bind
pub fn unbind_variable(&mut self, id: BindId)
Trait Implementations§
Auto Trait Implementations§
impl<C, E> Freeze for Env<C, E>
impl<C, E> !RefUnwindSafe for Env<C, E>
impl<C, E> Send for Env<C, E>
impl<C, E> Sync for Env<C, E>
impl<C, E> Unpin for Env<C, E>
impl<C, E> !UnwindSafe for Env<C, E>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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