pub struct ContractId(/* private fields */);
Implementations§
Source§impl ContractId
impl ContractId
pub fn as_type(&self, db: &dyn AnalyzerDb) -> TypeId
pub fn data(&self, db: &dyn AnalyzerDb) -> Rc<Contract>
pub fn span(&self, db: &dyn AnalyzerDb) -> Span
pub fn name(&self, db: &dyn AnalyzerDb) -> SmolStr
pub fn is_public(&self, db: &dyn AnalyzerDb) -> bool
pub fn name_span(&self, db: &dyn AnalyzerDb) -> Span
pub fn module(&self, db: &dyn AnalyzerDb) -> ModuleId
pub fn fields( &self, db: &dyn AnalyzerDb, ) -> Rc<IndexMap<SmolStr, ContractFieldId>>
pub fn field_type( &self, db: &dyn AnalyzerDb, name: &str, ) -> Option<Result<TypeId, TypeError>>
pub fn resolve_name( &self, db: &dyn AnalyzerDb, name: &str, ) -> Result<Option<NamedThing>, IncompleteItem>
pub fn init_function(&self, db: &dyn AnalyzerDb) -> Option<FunctionId>
pub fn call_function(&self, db: &dyn AnalyzerDb) -> Option<FunctionId>
pub fn all_functions(&self, db: &dyn AnalyzerDb) -> Rc<[FunctionId]>
Sourcepub fn functions(
&self,
db: &dyn AnalyzerDb,
) -> Rc<IndexMap<SmolStr, FunctionId>>
pub fn functions( &self, db: &dyn AnalyzerDb, ) -> Rc<IndexMap<SmolStr, FunctionId>>
User functions, public and not. Excludes __init__
and __call__
.
Sourcepub fn function(&self, db: &dyn AnalyzerDb, name: &str) -> Option<FunctionId>
pub fn function(&self, db: &dyn AnalyzerDb, name: &str) -> Option<FunctionId>
Lookup a function by name. Searches all user functions, private or not.
Excludes __init__
and __call__
.
Sourcepub fn public_functions(
&self,
db: &dyn AnalyzerDb,
) -> Rc<IndexMap<SmolStr, FunctionId>>
pub fn public_functions( &self, db: &dyn AnalyzerDb, ) -> Rc<IndexMap<SmolStr, FunctionId>>
Excludes __init__
and __call__
.
pub fn parent(&self, db: &dyn AnalyzerDb) -> Item
Sourcepub fn dependency_graph(&self, db: &dyn AnalyzerDb) -> Rc<DepGraph>
pub fn dependency_graph(&self, db: &dyn AnalyzerDb) -> Rc<DepGraph>
Dependency graph of the contract type, which consists of the field types and the dependencies of those types.
NOTE: Contract items should only
Sourcepub fn runtime_dependency_graph(&self, db: &dyn AnalyzerDb) -> Rc<DepGraph>
pub fn runtime_dependency_graph(&self, db: &dyn AnalyzerDb) -> Rc<DepGraph>
Dependency graph of the (imaginary) __call__
function, which
dispatches to the contract’s public functions.
pub fn sink_diagnostics( &self, db: &dyn AnalyzerDb, sink: &mut impl DiagnosticSink, )
Trait Implementations§
Source§impl Clone for ContractId
impl Clone for ContractId
Source§fn clone(&self) -> ContractId
fn clone(&self) -> ContractId
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 ContractId
impl Debug for ContractId
Source§impl Hash for ContractId
impl Hash for ContractId
Source§impl InternKey for ContractId
impl InternKey for ContractId
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 ContractId
impl Ord for ContractId
Source§fn cmp(&self, other: &ContractId) -> Ordering
fn cmp(&self, other: &ContractId) -> 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 ContractId
impl PartialEq for ContractId
Source§impl PartialOrd for ContractId
impl PartialOrd for ContractId
impl Copy for ContractId
impl Eq for ContractId
impl StructuralPartialEq for ContractId
Auto Trait Implementations§
impl Freeze for ContractId
impl RefUnwindSafe for ContractId
impl Send for ContractId
impl Sync for ContractId
impl Unpin for ContractId
impl UnwindSafe for ContractId
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.