pub struct SymModule<'db>(Id, PhantomData<&'db Value<SymModule<'static>>>);Tuple Fields§
§0: Id§1: PhantomData<&'db Value<SymModule<'static>>>Implementations§
Source§impl<'db> SymModule<'db>
impl<'db> SymModule<'db>
fn resolve_name_against_definitions( self, db: &'db dyn Db, id: Identifier<'db>, ) -> Option<NameResolutionSym<'db>>
fn resolve_name_against_uses( self, db: &'db dyn Db, id: Identifier<'db>, ) -> Option<NameResolution<'db>>
Source§impl SymModule<'static>
impl SymModule<'static>
pub fn ingredient(db: &dyn Database) -> &IngredientImpl<SymModule<'static>>
Source§impl<'db> SymModule<'db>
impl<'db> SymModule<'db>
pub fn new<Db_>(
db: &'db Db_,
source: AstModule<'db>,
class_map: Map<Identifier<'db>, SymAggregate<'db>>,
function_map: Map<Identifier<'db>, SymFunction<'db>>,
ast_use_map: Map<Identifier<'db>, AstUse<'db>>,
) -> Selfwhere
Db_: ?Sized + Database,
pub(crate) fn class_map<Db_>(
self,
db: &'db Db_,
) -> &'db Map<Identifier<'db>, SymAggregate<'db>>where
Db_: ?Sized + Database,
pub(crate) fn function_map<Db_>(
self,
db: &'db Db_,
) -> &'db Map<Identifier<'db>, SymFunction<'db>>where
Db_: ?Sized + Database,
pub(crate) fn ast_use_map<Db_>(
self,
db: &'db Db_,
) -> &'db Map<Identifier<'db>, AstUse<'db>>where
Db_: ?Sized + Database,
pub fn source<Db_>(self, db: &'db Db_) -> AstModule<'db>where
Db_: ?Sized + Database,
Source§impl<'_db> SymModule<'_db>
impl<'_db> SymModule<'_db>
Sourcepub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Resultwhere
for<'db> AstModule<'db>: Debug,
for<'db> Map<Identifier<'db>, SymAggregate<'db>>: Debug,
for<'db> Map<Identifier<'db>, SymFunction<'db>>: Debug,
for<'db> Map<Identifier<'db>, AstUse<'db>>: Debug,
pub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Resultwhere
for<'db> AstModule<'db>: Debug,
for<'db> Map<Identifier<'db>, SymAggregate<'db>>: Debug,
for<'db> Map<Identifier<'db>, SymFunction<'db>>: Debug,
for<'db> Map<Identifier<'db>, AstUse<'db>>: Debug,
Default debug formatting for this struct (may be useful if you define your own Debug impl)
Source§impl<'db> SymModule<'db>
impl<'db> SymModule<'db>
pub fn name(self, db: &'db dyn Db) -> Identifier<'db>
Sourcepub fn mod_scope(self, db: &'db dyn Db) -> Scope<'db, 'db>
pub fn mod_scope(self, db: &'db dyn Db) -> Scope<'db, 'db>
Name resolution scope for items in this module.
Sourcepub fn items(self, db: &'db dyn Db) -> impl Iterator<Item = SymItem<'db>>
pub fn items(self, db: &'db dyn Db) -> impl Iterator<Item = SymItem<'db>>
Returns a list of all top-level items in the module
Sourcepub fn function_named(
self,
db: &'db dyn Db,
name: Identifier<'db>,
) -> Option<SymFunction<'db>>
pub fn function_named( self, db: &'db dyn Db, name: Identifier<'db>, ) -> Option<SymFunction<'db>>
Returns the function named name in this module, if any.
Trait Implementations§
Source§impl<'db> CheckUseItems<'db> for SymModule<'db>
Resolve all use items found in this module.
This is executed by dada-ir-check crate
simply to force errors to be reported.
impl<'db> CheckUseItems<'db> for SymModule<'db>
Resolve all use items found in this module.
This is executed by dada-ir-check crate
simply to force errors to be reported.
fn check_use_items(self: SymModule<'db>, db: &'db dyn Db)
Source§impl Configuration for SymModule<'static>
impl Configuration for SymModule<'static>
Source§const DEBUG_NAME: &'static str = "SymModule"
const DEBUG_NAME: &'static str = "SymModule"
The debug name of the tracked struct.
Source§const FIELD_DEBUG_NAMES: &'static [&'static str]
const FIELD_DEBUG_NAMES: &'static [&'static str]
The debug names of any fields.
Source§const TRACKED_FIELD_INDICES: &'static [usize]
const TRACKED_FIELD_INDICES: &'static [usize]
The relative indices of any tracked fields.
Source§type Fields<'db> = (AstModule<'db>, HashMap<Identifier<'db>, SymAggregate<'db>, BuildHasherDefault<FxHasher>>, HashMap<Identifier<'db>, SymFunction<'db>, BuildHasherDefault<FxHasher>>, HashMap<Identifier<'db>, AstUse<'db>, BuildHasherDefault<FxHasher>>)
type Fields<'db> = (AstModule<'db>, HashMap<Identifier<'db>, SymAggregate<'db>, BuildHasherDefault<FxHasher>>, HashMap<Identifier<'db>, SymFunction<'db>, BuildHasherDefault<FxHasher>>, HashMap<Identifier<'db>, AstUse<'db>, BuildHasherDefault<FxHasher>>)
A (possibly empty) tuple of the fields for this struct.
Source§type Revisions = Array<Revision, 3>
type Revisions = Array<Revision, 3>
A array of [
Revision][] values, one per each of the tracked value fields.
When a struct is re-recreated in a new revision, the corresponding
entries for each field are updated to the new revision if their
values have changed (or if the field is marked as #[no_eq]).type Struct<'db> = SymModule<'db>
Source§fn struct_from_id<'db>(id: Id) -> Self::Struct<'db>
fn struct_from_id<'db>(id: Id) -> Self::Struct<'db>
Create an end-user struct from the underlying raw pointer. Read more
Source§fn deref_struct(s: Self::Struct<'_>) -> Id
fn deref_struct(s: Self::Struct<'_>) -> Id
Deref the struct to yield the underlying id.
fn untracked_fields(fields: &Self::Fields<'_>) -> impl Hash
Source§fn new_revisions(current_revision: Revision_) -> Self::Revisions
fn new_revisions(current_revision: Revision_) -> Self::Revisions
Create a new value revision array where each element is set to
current_revision.Source§unsafe fn update_fields<'db>(
current_revision: Revision_,
revisions: &mut Self::Revisions,
old_fields: *mut Self::Fields<'db>,
new_fields: Self::Fields<'db>,
) -> bool
unsafe fn update_fields<'db>( current_revision: Revision_, revisions: &mut Self::Revisions, old_fields: *mut Self::Fields<'db>, new_fields: Self::Fields<'db>, ) -> bool
Update the field data and, if the value has changed,
the appropriate entry in the
revisions array (tracked fields only). Read moreSource§impl<'db> From<SymModule<'db>> for NameResolutionSym<'db>
impl<'db> From<SymModule<'db>> for NameResolutionSym<'db>
Source§impl<'scope, 'db> From<SymModule<'db>> for ScopeChainKind<'scope, 'db>
impl<'scope, 'db> From<SymModule<'db>> for ScopeChainKind<'scope, 'db>
Source§impl<'db> Ord for SymModule<'db>
impl<'db> Ord for SymModule<'db>
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<'db> PartialOrd for SymModule<'db>
impl<'db> PartialOrd for SymModule<'db>
Source§impl<'db> ScopeTreeNode<'db> for SymModule<'db>
impl<'db> ScopeTreeNode<'db> for SymModule<'db>
fn direct_super_scope(self, _db: &'db dyn Db) -> Option<ScopeItem<'db>>
fn direct_generic_parameters( self: SymModule<'db>, _db: &'db dyn Db, ) -> &'db Vec<SymVariable<'db>>
Source§fn into_scope(self, db: &'db dyn Db) -> Scope<'db, 'db>
fn into_scope(self, db: &'db dyn Db) -> Scope<'db, 'db>
Convert this scope item into a scope for the items declared within it.
fn push_direct_ast_where_clauses( self, _db: &'db dyn Db, _out: &mut Vec<AstWhereClause<'db>>, )
Source§fn iter_super_scopes(
self,
db: &'db dyn Db,
) -> impl Iterator<Item = ScopeItem<'db>>
fn iter_super_scopes( self, db: &'db dyn Db, ) -> impl Iterator<Item = ScopeItem<'db>>
Iterator that starts from self and traverses up to all super scope items.
Source§fn transitive_generic_parameters(self, db: &'db dyn Db) -> Vec<SymVariable<'db>>
fn transitive_generic_parameters(self, db: &'db dyn Db) -> Vec<SymVariable<'db>>
Compute the set of transitive generic parameters.
The returned vector begins with the parameters from the outermost vector.
Source§fn expected_generic_parameters(self, db: &'db dyn Db) -> usize
fn expected_generic_parameters(self, db: &'db dyn Db) -> usize
Compute the set of transitive generic parameters.
The returned vector begins with the parameters from the outermost vector.
fn push_transitive_where_clauses( self, db: &'db dyn Db, out: &mut Vec<AstWhereClause<'db>>, )
Source§impl TrackedStructInDb for SymModule<'_>
impl TrackedStructInDb for SymModule<'_>
Source§fn database_key_index(db: &dyn Database, id: Id) -> DatabaseKeyIndex
fn database_key_index(db: &dyn Database, id: Id) -> DatabaseKeyIndex
Converts the identifier for this tracked struct into a
DatabaseKeyIndex.impl<'db> Copy for SymModule<'db>
impl<'db> Eq for SymModule<'db>
impl Send for SymModule<'_>
impl<'db> StructuralPartialEq for SymModule<'db>
impl Sync for SymModule<'_>
Auto Trait Implementations§
impl<'db> Freeze for SymModule<'db>
impl<'db> !RefUnwindSafe for SymModule<'db>
impl<'db> Unpin for SymModule<'db>
impl<'db> UnsafeUnpin for SymModule<'db>
impl<'db> !UnwindSafe for SymModule<'db>
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
§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.§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<T> HashEqLike<T> for T
impl<T> HashEqLike<T> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more