pub struct DefRef(/* private fields */);Expand description
Implementations§
Source§impl DefRef
impl DefRef
Sourcepub const fn index(self) -> usize
pub const fn index(self) -> usize
The dense position of the definition.
§Examples
use resolve_lang::DefRef;
assert_eq!(DefRef::from_index(0).index(), 0);Sourcepub const fn from_index(i: usize) -> Self
pub const fn from_index(i: usize) -> Self
A handle from a dense position (saturating past u32::MAX).
§Examples
use resolve_lang::DefRef;
assert_eq!(DefRef::from_index(9), DefRef::from_index(9));Trait Implementations§
impl Copy for DefRef
impl Eq for DefRef
Source§impl Ord for DefRef
impl Ord for DefRef
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 DefRef
impl PartialOrd for DefRef
impl StructuralPartialEq for DefRef
Auto Trait Implementations§
impl Freeze for DefRef
impl RefUnwindSafe for DefRef
impl Send for DefRef
impl Sync for DefRef
impl Unpin for DefRef
impl UnsafeUnpin for DefRef
impl UnwindSafe for DefRef
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