pub struct AnyEnt<'a> {
pub id: EntityId,
pub parent: Option<EntRef<'a>>,
pub related: Related<'a>,
pub implicits: Vec<EntRef<'a>>,
pub designator: Designator,
pub kind: AnyEntKind<'a>,
pub decl_pos: Option<SrcPos>,
pub attrs: FnvHashMap<Symbol, (SrcPos, AttributeEnt<'a>)>,
}Expand description
A named entity as defined in LRM 6.1.
Every declaration creates one or more named entities.
Fields§
§id: EntityIdA unique id of the entity. Entities with the same id will be the same.
parent: Option<EntRef<'a>>§implicits: Vec<EntRef<'a>>§designator: DesignatorThe location where the declaration was made. Builtin and implicit declaration will not have a source position.
kind: AnyEntKind<'a>§decl_pos: Option<SrcPos>§attrs: FnvHashMap<Symbol, (SrcPos, AttributeEnt<'a>)>Custom attributes on this entity
Implementations§
source§impl<'a> AnyEnt<'a>
impl<'a> AnyEnt<'a>
pub fn id(&self) -> EntityId
pub fn declaration(&'a self) -> EntRef<'a>
pub fn is_implicit(&self) -> bool
pub fn is_subprogram(&self) -> bool
pub fn is_subprogram_decl(&self) -> bool
pub fn is_protected_type(&self) -> bool
pub fn is_protected_type_body(&self) -> bool
pub fn is_declared_by(&self, other: EntRef<'_>) -> bool
pub fn is_explicit(&self) -> bool
pub fn decl_pos(&self) -> Option<&SrcPos>
pub fn parent_in_same_source(&self) -> Option<EntRef<'a>>
pub fn library_name(&self) -> Option<&Symbol>
pub fn designator(&self) -> &Designator
pub fn path_name(&self) -> String
pub fn kind(&self) -> &AnyEntKind<'_>
pub fn error( &self, diagnostics: &mut dyn DiagnosticHandler, message: impl Into<String> )
pub fn is_overloaded(&self) -> bool
pub fn signature(&self) -> Option<&Signature<'_>>
pub fn as_actual(&self) -> &AnyEnt<'_>
pub fn get_attribute(&self, name: &Symbol) -> Option<AttributeEnt<'a>>
sourcepub fn actual_kind(&self) -> &AnyEntKind<'_>
pub fn actual_kind(&self) -> &AnyEntKind<'_>
Strip aliases and return reference to actual entity kind
sourcepub fn is_alias_of(&self, other: &AnyEnt<'_>) -> bool
pub fn is_alias_of(&self, other: &AnyEnt<'_>) -> bool
Returns true if self is alias of other
pub fn describe(&self) -> String
Trait Implementations§
source§impl<'a> PartialEq for AnyEnt<'a>
impl<'a> PartialEq for AnyEnt<'a>
impl<'a> Eq for AnyEnt<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for AnyEnt<'a>
impl<'a> Send for AnyEnt<'a>
impl<'a> Sync for AnyEnt<'a>
impl<'a> Unpin for AnyEnt<'a>
impl<'a> !UnwindSafe for AnyEnt<'a>
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.