pub enum Item {
Ingot(IngotId),
Module(ModuleId),
Type(TypeDef),
GenericType(GenericType),
Trait(TraitId),
Impl(ImplId),
Function(FunctionId),
Constant(ModuleConstantId),
BuiltinFunction(GlobalFunction),
Intrinsic(Intrinsic),
Attribute(AttributeId),
}
Expand description
A named item. This does not include things inside of a function body.
Variants§
Ingot(IngotId)
Module(ModuleId)
Type(TypeDef)
GenericType(GenericType)
Trait(TraitId)
Impl(ImplId)
Function(FunctionId)
Constant(ModuleConstantId)
BuiltinFunction(GlobalFunction)
Intrinsic(Intrinsic)
Attribute(AttributeId)
Implementations§
Source§impl Item
impl Item
pub fn name(&self, db: &dyn AnalyzerDb) -> SmolStr
pub fn name_span(&self, db: &dyn AnalyzerDb) -> Option<Span>
pub fn is_public(&self, db: &dyn AnalyzerDb) -> bool
pub fn is_builtin(&self) -> bool
pub fn is_struct(&self, val: &StructId) -> bool
pub fn is_contract(&self) -> bool
pub fn item_kind_display_name(&self) -> &'static str
pub fn items(&self, db: &dyn AnalyzerDb) -> Rc<IndexMap<SmolStr, Item>>
pub fn parent(&self, db: &dyn AnalyzerDb) -> Option<Item>
pub fn module(&self, db: &dyn AnalyzerDb) -> Option<ModuleId>
pub fn path(&self, db: &dyn AnalyzerDb) -> Rc<[SmolStr]>
pub fn dependency_graph(&self, db: &dyn AnalyzerDb) -> Option<Rc<DepGraph>>
pub fn resolve_path_segments( &self, db: &dyn AnalyzerDb, segments: &[Node<SmolStr>], ) -> Analysis<Option<NamedThing>>
pub fn function_sig( &self, db: &dyn AnalyzerDb, name: &str, ) -> Option<FunctionSigId>
pub fn sink_diagnostics( &self, db: &dyn AnalyzerDb, sink: &mut impl DiagnosticSink, )
pub fn attributes(&self, db: &dyn AnalyzerDb) -> Vec<AttributeId>
Trait Implementations§
Source§impl Ord for Item
impl Ord for Item
Source§impl PartialOrd for Item
impl PartialOrd for Item
impl Copy for Item
impl Eq for Item
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnwindSafe for Item
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,
§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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§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.