pub struct NodeKey {
pub file: FileId,
pub range: (u32, u32),
}Expand description
Identity of one HIR node for side-table purposes: the file it lives in plus its source range.
TextRange has no Ord impl (ranges have no single natural total
order), so the range travels as a (start, end) u32 pair — the same
range_key convention infer, strict, and structs each already use
for their own range-keyed maps. A range is only unique within a file,
hence the FileId half: side-table entries must never be merged
across files.
Fields§
§file: FileIdThe file the node was lowered from.
range: (u32, u32)The node’s source range, as (start, end).
Implementations§
Trait Implementations§
impl Copy for NodeKey
impl Eq for NodeKey
Source§impl Ord for NodeKey
impl Ord for NodeKey
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for NodeKey
impl PartialOrd for NodeKey
impl StructuralPartialEq for NodeKey
Auto Trait Implementations§
impl Freeze for NodeKey
impl RefUnwindSafe for NodeKey
impl Send for NodeKey
impl Sync for NodeKey
impl Unpin for NodeKey
impl UnsafeUnpin for NodeKey
impl UnwindSafe for NodeKey
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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§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.