pub struct Occurrence {
pub def: DefRef,
pub reference: Option<u32>,
}Expand description
Fields§
§def: DefRefThe definition named there.
reference: Option<u32>The reference there (by position in Index::references_all), or
None if the position is the definition’s own name.
Implementations§
Source§impl Occurrence
impl Occurrence
Sourcepub const fn is_definition(&self) -> bool
pub const fn is_definition(&self) -> bool
Whether the position is the definition’s own name.
§Examples
use resolve_lang::{DefRef, Occurrence};
let o = Occurrence { def: DefRef::from_index(0), reference: Some(3) };
assert!(!o.is_definition());Trait Implementations§
Source§impl Clone for Occurrence
impl Clone for Occurrence
impl Copy for Occurrence
Source§impl Debug for Occurrence
impl Debug for Occurrence
impl Eq for Occurrence
Source§impl PartialEq for Occurrence
impl PartialEq for Occurrence
impl StructuralPartialEq for Occurrence
Auto Trait Implementations§
impl Freeze for Occurrence
impl RefUnwindSafe for Occurrence
impl Send for Occurrence
impl Sync for Occurrence
impl Unpin for Occurrence
impl UnsafeUnpin for Occurrence
impl UnwindSafe for Occurrence
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