pub struct EntityRef<'m> { /* private fields */ }Expand description
An entity of a Model; cheap to copy.
Implementations§
Source§impl<'m> EntityRef<'m>
impl<'m> EntityRef<'m>
pub fn id(self) -> EntityId
Sourcepub fn key(self) -> &'m str
pub fn key(self) -> &'m str
Unique and stable across runs; see crate::SymbolKey.
pub fn kind(self) -> EntityKind
pub fn language(self) -> Option<&'m LanguageId>
Sourcepub fn external(self) -> bool
pub fn external(self) -> bool
Referenced but not defined in the analysed sources (library, JDK…).
Sourcepub fn name_range(self) -> Option<Range>
pub fn name_range(self) -> Option<Range>
Identifier only; used to match SCIP definition occurrences.
pub fn props(self) -> &'m Props
pub fn parent(self) -> Option<EntityRef<'m>>
Sourcepub fn ancestors(self) -> impl Iterator<Item = EntityRef<'m>>
pub fn ancestors(self) -> impl Iterator<Item = EntityRef<'m>>
Enclosing entities, innermost first. Bounded to survive cycles.
pub fn children(self) -> impl ExactSizeIterator<Item = EntityRef<'m>>
Sourcepub fn outgoing(self) -> impl ExactSizeIterator<Item = RelationRef<'m>>
pub fn outgoing(self) -> impl ExactSizeIterator<Item = RelationRef<'m>>
Sorted by kind, then target.
pub fn incoming(self) -> impl ExactSizeIterator<Item = RelationRef<'m>>
Sourcepub fn targets(self, kind: &RelationKind) -> impl Iterator<Item = EntityRef<'m>>
pub fn targets(self, kind: &RelationKind) -> impl Iterator<Item = EntityRef<'m>>
Targets of the outgoing relations of kind, any provenance.
Trait Implementations§
impl<'m> Copy for EntityRef<'m>
Auto Trait Implementations§
impl<'m> Forget for EntityRef<'m>
impl<'m> Freeze for EntityRef<'m>
impl<'m> Move for EntityRef<'m>
impl<'m> RefUnwindSafe for EntityRef<'m>
impl<'m> Send for EntityRef<'m>
impl<'m> Sync for EntityRef<'m>
impl<'m> Unpin for EntityRef<'m>
impl<'m> UnsafeUnpin for EntityRef<'m>
impl<'m> UnwindSafe for EntityRef<'m>
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