pub struct DefId(pub u32);Expand description
Solver-owned definition identifier.
Unlike SymbolRef which references Binder symbols, DefId is owned by
the Solver and can be created without Binder context.
§Comparison with SymbolRef
| Aspect | SymbolRef | DefId |
|---|---|---|
| Owner | Binder | Solver |
| Stable across edits | No | Yes (with content-hash) |
| Requires Binder | Yes | No |
| Supports testing | Limited | Full |
Tuple Fields§
§0: u32Implementations§
Trait Implementations§
impl Copy for DefId
impl Eq for DefId
impl StructuralPartialEq for DefId
Auto Trait Implementations§
impl Freeze for DefId
impl RefUnwindSafe for DefId
impl Send for DefId
impl Sync for DefId
impl Unpin for DefId
impl UnsafeUnpin for DefId
impl UnwindSafe for DefId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.