pub struct ModuleConstantId(/* private fields */);
Implementations§
Source§impl ModuleConstantId
impl ModuleConstantId
pub fn data(&self, db: &dyn AnalyzerDb) -> Rc<ModuleConstant>
pub fn span(&self, db: &dyn AnalyzerDb) -> Span
pub fn typ(&self, db: &dyn AnalyzerDb) -> Result<TypeId, TypeError>
pub fn name(&self, db: &dyn AnalyzerDb) -> SmolStr
pub fn constant_value( &self, db: &dyn AnalyzerDb, ) -> Result<Constant, ConstEvalError>
pub fn name_span(&self, db: &dyn AnalyzerDb) -> Span
pub fn value(&self, db: &dyn AnalyzerDb) -> Expr
pub fn parent(&self, db: &dyn AnalyzerDb) -> Item
pub fn is_public(&self, db: &dyn AnalyzerDb) -> bool
pub fn module(&self, db: &dyn AnalyzerDb) -> ModuleId
pub fn node_id(&self, db: &dyn AnalyzerDb) -> NodeId
pub fn sink_diagnostics( &self, db: &dyn AnalyzerDb, sink: &mut impl DiagnosticSink, )
Trait Implementations§
Source§impl Clone for ModuleConstantId
impl Clone for ModuleConstantId
Source§fn clone(&self) -> ModuleConstantId
fn clone(&self) -> ModuleConstantId
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ModuleConstantId
impl Debug for ModuleConstantId
Source§impl Hash for ModuleConstantId
impl Hash for ModuleConstantId
Source§impl InternKey for ModuleConstantId
impl InternKey for ModuleConstantId
Source§fn from_intern_id(v: InternId) -> Self
fn from_intern_id(v: InternId) -> Self
Create an instance of the intern-key from a
u32
value.Source§fn as_intern_id(&self) -> InternId
fn as_intern_id(&self) -> InternId
Extract the
u32
with which the intern-key was created.Source§impl Ord for ModuleConstantId
impl Ord for ModuleConstantId
Source§fn cmp(&self, other: &ModuleConstantId) -> Ordering
fn cmp(&self, other: &ModuleConstantId) -> Ordering
1.21.0 · 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
Source§impl PartialEq for ModuleConstantId
impl PartialEq for ModuleConstantId
Source§impl PartialOrd for ModuleConstantId
impl PartialOrd for ModuleConstantId
impl Copy for ModuleConstantId
impl Eq for ModuleConstantId
impl StructuralPartialEq for ModuleConstantId
Auto Trait Implementations§
impl Freeze for ModuleConstantId
impl RefUnwindSafe for ModuleConstantId
impl Send for ModuleConstantId
impl Sync for ModuleConstantId
impl Unpin for ModuleConstantId
impl UnwindSafe for ModuleConstantId
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.