pub struct ExprKey(pub Expr);Expand description
Structural key derived from the content of one Expr node.
Two ExprKey values are equal if and only if the corresponding Expr
values are structurally identical (same variant, same fields). This is
precisely the condition under which hash-consing must return the same
Idx<Expr>.
Internally the key clones the Expr so that the HashMap<ExprKey, …>
owns its keys independently of any arena.
Tuple Fields§
§0: ExprImplementations§
Source§impl ExprKey
impl ExprKey
Sourcepub fn lam(bi: BinderInfo, name: Name, dom: Expr, body: Expr) -> Self
pub fn lam(bi: BinderInfo, name: Name, dom: Expr, body: Expr) -> Self
Key for Expr::Lam(bi, name, dom, body).
Sourcepub fn pi(bi: BinderInfo, name: Name, dom: Expr, cod: Expr) -> Self
pub fn pi(bi: BinderInfo, name: Name, dom: Expr, cod: Expr) -> Self
Key for Expr::Pi(bi, name, dom, cod).
Trait Implementations§
impl Eq for ExprKey
impl StructuralPartialEq for ExprKey
Auto Trait Implementations§
impl Freeze for ExprKey
impl RefUnwindSafe for ExprKey
impl Send for ExprKey
impl Sync for ExprKey
impl Unpin for ExprKey
impl UnsafeUnpin for ExprKey
impl UnwindSafe for ExprKey
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