pub struct Ctx {
pub env: Rc<Env>,
pub report: Report,
pub vars: HashMap<String, Ty>,
pub present: HashSet<String>,
pub nonnull: HashSet<String>,
pub const_memo: Rc<RefCell<HashMap<String, Ty>>>,
pub pos: Rc<RefCell<Option<Rc<Expr>>>>,
pub record: Option<Rc<dyn Fn(&Rc<Expr>, &Ty)>>,
pub resolve_hook: Option<Rc<dyn Fn(&Rc<Expr>, Option<Target>)>>,
}Fields§
§env: Rc<Env>§report: Report§vars: HashMap<String, Ty>§present: HashSet<String>§nonnull: HashSet<String>§const_memo: Rc<RefCell<HashMap<String, Ty>>>§pos: Rc<RefCell<Option<Rc<Expr>>>>the expression under inference (shared by child contexts): what a report is anchored to
record: Option<Rc<dyn Fn(&Rc<Expr>, &Ty)>>Phase 6 foundations: every inferred node’s type, and every name’s resolution (the language server’s tables)
resolve_hook: Option<Rc<dyn Fn(&Rc<Expr>, Option<Target>)>>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Ctx
impl !Send for Ctx
impl !Sync for Ctx
impl !UnwindSafe for Ctx
impl Freeze for Ctx
impl Unpin for Ctx
impl UnsafeUnpin for Ctx
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