pub struct ModuleIdLt<'db>(pub(crate) Id, pub(crate) PhantomData<fn() -> &'db ()>);Tuple Fields§
§0: Id§1: PhantomData<fn() -> &'db ()>Implementations§
Source§impl ModuleIdLt<'static>
impl ModuleIdLt<'static>
pub fn ingredient(db: &dyn Database) -> &IngredientImpl<Self>
pub(crate) fn ingredient_(zalsa: &Zalsa) -> &IngredientImpl<Self>
Source§impl<'db> ModuleIdLt<'db>
impl<'db> ModuleIdLt<'db>
pub fn new<Db_>(
db: &'db Db_,
krate: Crate,
block: Option<BlockIdLt<'db>>,
containing_module_inside_def_map: Option<ModuleIdLt<'db>>,
name_or_empty: Name,
) -> Selfwhere
Db_: ?Sized + Database,
Sourcepub fn krate<Db_>(self, db: &'db Db_) -> Cratewhere
Db_: ?Sized + Database,
pub fn krate<Db_>(self, db: &'db Db_) -> Cratewhere
Db_: ?Sized + Database,
The crate this module belongs to.
Sourcepub fn block<Db_>(self, db: &'db Db_) -> Option<BlockIdLt<'db>>where
Db_: ?Sized + Database,
pub fn block<Db_>(self, db: &'db Db_) -> Option<BlockIdLt<'db>>where
Db_: ?Sized + Database,
If this ModuleId was derived from a DefMap for a block expression, this stores the
BlockId of that block expression. If None, this module is part of the crate-level
DefMap of krate.
Sourcepub fn containing_module_inside_def_map<Db_>(
self,
db: &'db Db_,
) -> &'db Option<ModuleIdLt<'db>>where
Db_: ?Sized + Database,
pub fn containing_module_inside_def_map<Db_>(
self,
db: &'db Db_,
) -> &'db Option<ModuleIdLt<'db>>where
Db_: ?Sized + Database,
The parent module of this module, or None if this is the root module inside the def
map (including for block def maps).
Sourcepub(crate) fn name_or_empty<Db_>(self, db: &'db Db_) -> Namewhere
Db_: ?Sized + Database,
pub(crate) fn name_or_empty<Db_>(self, db: &'db Db_) -> Namewhere
Db_: ?Sized + Database,
The name of this module, or [sym::__empty] for the root module.
Source§impl<'_db> ModuleIdLt<'_db>
impl<'_db> ModuleIdLt<'_db>
Source§impl<'db> ModuleIdLt<'db>
impl<'db> ModuleIdLt<'db>
Sourcepub unsafe fn to_static(self) -> ModuleId
pub unsafe fn to_static(self) -> ModuleId
§Safety
The caller must ensure that the ModuleId is not leaked outside of query computations.
pub fn def_map(self, db: &'db dyn SourceDatabase) -> &'db DefMap
pub(crate) fn local_def_map( self, db: &'db dyn SourceDatabase, ) -> (&'db DefMap, &'db LocalDefMap)
pub(crate) fn only_local_def_map( self, db: &'db dyn SourceDatabase, ) -> &'db LocalDefMap
pub fn crate_def_map(self, db: &'db dyn SourceDatabase) -> &'db DefMap
pub fn name(self, db: &dyn SourceDatabase) -> Option<Name>
Sourcepub fn containing_module(
self,
db: &'db dyn SourceDatabase,
) -> Option<ModuleIdLt<'db>>
pub fn containing_module( self, db: &'db dyn SourceDatabase, ) -> Option<ModuleIdLt<'db>>
Returns the module containing self, either the parent mod, or the module (or block) containing
the block, if self corresponds to a block expression.
pub fn is_block_module(self, db: &dyn SourceDatabase) -> bool
Source§impl ModuleIdLt<'static>
impl ModuleIdLt<'static>
Sourcepub unsafe fn to_db<'db>(self, _db: &'db dyn SourceDatabase) -> ModuleIdLt<'db>
pub unsafe fn to_db<'db>(self, _db: &'db dyn SourceDatabase) -> ModuleIdLt<'db>
§Safety
The caller must ensure that the ModuleId comes from the given database.
Trait Implementations§
Source§impl<'db> Clone for ModuleIdLt<'db>
impl<'db> Clone for ModuleIdLt<'db>
Source§fn clone(&self) -> ModuleIdLt<'db>
fn clone(&self) -> ModuleIdLt<'db>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Configuration for ModuleIdLt<'static>
impl Configuration for ModuleIdLt<'static>
const LOCATION: Location
Source§const DEBUG_NAME: &'static str = "ModuleIdLt"
const DEBUG_NAME: &'static str = "ModuleIdLt"
The debug name of the tracked struct.
Source§const TRACKED_FIELD_NAMES: &'static [&'static str]
const TRACKED_FIELD_NAMES: &'static [&'static str]
The debug names of any tracked 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> = (Crate, Option<BlockIdLt<'db>>, Option<ModuleIdLt<'db>>, Name)
type Fields<'db> = (Crate, Option<BlockIdLt<'db>>, Option<ModuleIdLt<'db>>, Name)
A (possibly empty) tuple of the fields for this struct.
type Revisions = [AtomicRevision; 0]
type Struct<'db> = ModuleIdLt<'db>
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§fn update_fields<'db>(
current_revision: Revision_,
revisions: &Self::Revisions,
old_fields: &mut Self::Fields<'db>,
new_fields: Self::Fields<'db>,
) -> bool
fn update_fields<'db>( current_revision: Revision_, revisions: &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§fn serialize<S: Serializer>(
fields: &Self::Fields<'_>,
serializer: S,
) -> Result<S::Ok, S::Error>
fn serialize<S: Serializer>( fields: &Self::Fields<'_>, serializer: S, ) -> Result<S::Ok, S::Error>
Serialize the fields using
serde. Read moreSource§fn deserialize<'de, D: Deserializer<'de>>(
deserializer: D,
) -> Result<Self::Fields<'static>, D::Error>
fn deserialize<'de, D: Deserializer<'de>>( deserializer: D, ) -> Result<Self::Fields<'static>, D::Error>
Deserialize the fields using
serde. Read moreimpl<'db> Copy for ModuleIdLt<'db>
Source§impl Debug for ModuleIdLt<'_>
impl Debug for ModuleIdLt<'_>
impl<'db> Eq for ModuleIdLt<'db>
Source§impl From<ModuleIdLt<'static>> for ItemContainerId
impl From<ModuleIdLt<'static>> for ItemContainerId
Source§fn from(it: ModuleId) -> ItemContainerId
fn from(it: ModuleId) -> ItemContainerId
Converts to this type from the input type.
Source§impl From<ModuleIdLt<'static>> for ModuleDefId
impl From<ModuleIdLt<'static>> for ModuleDefId
Source§fn from(it: ModuleId) -> ModuleDefId
fn from(it: ModuleId) -> ModuleDefId
Converts to this type from the input type.
Source§impl From<ModuleIdLt<'static>> for AttrDefId
impl From<ModuleIdLt<'static>> for AttrDefId
Source§impl<'db> HasJar for ModuleIdLt<'db>
impl<'db> HasJar for ModuleIdLt<'db>
Source§impl<'db> Hash for ModuleIdLt<'db>
impl<'db> Hash for ModuleIdLt<'db>
Source§impl Index<ModuleIdLt<'_>> for DefMap
impl Index<ModuleIdLt<'_>> for DefMap
Source§type Output = ModuleData
type Output = ModuleData
The returned type after indexing.
Source§fn index(&self, id: ModuleIdLt<'_>) -> &ModuleData
fn index(&self, id: ModuleIdLt<'_>) -> &ModuleData
Performs the indexing (
container[index]) operation. Read moreSource§impl Index<ModuleIdLt<'_>> for ModulesMap
impl Index<ModuleIdLt<'_>> for ModulesMap
Source§type Output = ModuleData
type Output = ModuleData
The returned type after indexing.
Source§fn index(&self, id: ModuleIdLt<'_>) -> &ModuleData
fn index(&self, id: ModuleIdLt<'_>) -> &ModuleData
Performs the indexing (
container[index]) operation. Read moreSource§impl IndexMut<ModuleIdLt<'static>> for DefMap
impl IndexMut<ModuleIdLt<'static>> for DefMap
Source§impl IndexMut<ModuleIdLt<'static>> for ModulesMap
impl IndexMut<ModuleIdLt<'static>> for ModulesMap
Source§impl<'db> Ord for ModuleIdLt<'db>
impl<'db> Ord for ModuleIdLt<'db>
Source§fn cmp(&self, other: &ModuleIdLt<'db>) -> Ordering
fn cmp(&self, other: &ModuleIdLt<'db>) -> Ordering
1.21.0 (const: unstable) · 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> PartialEq for ModuleIdLt<'db>
impl<'db> PartialEq for ModuleIdLt<'db>
Source§impl<'db> PartialOrd for ModuleIdLt<'db>
impl<'db> PartialOrd for ModuleIdLt<'db>
Source§impl SalsaStructInDb for ModuleIdLt<'_>
impl SalsaStructInDb for ModuleIdLt<'_>
Source§const LEAF_TYPE_IDS: &'static [ConstTypeId]
const LEAF_TYPE_IDS: &'static [ConstTypeId]
The type IDs of all concrete (leaf) salsa struct types that this type can contain. Read more
type MemoIngredientMap = MemoIngredientSingletonIndex
Source§fn lookup_ingredient_index(aux: &Zalsa) -> IngredientIndices
fn lookup_ingredient_index(aux: &Zalsa) -> IngredientIndices
Lookup or create ingredient indices. Read more
Source§fn entries(zalsa: &Zalsa) -> impl Iterator<Item = DatabaseKeyIndex> + '_
fn entries(zalsa: &Zalsa) -> impl Iterator<Item = DatabaseKeyIndex> + '_
Returns the IDs of any instances of this struct in the database.
Source§fn cast(id: Id, type_id: TypeId) -> Option<Self>
fn cast(id: Id, type_id: TypeId) -> Option<Self>
Plumbing to support nested salsa supertypes. Read more
Source§unsafe fn memo_table(
zalsa: &Zalsa,
id: Id,
current_revision: Revision,
) -> MemoTableWithTypes<'_>
unsafe fn memo_table( zalsa: &Zalsa, id: Id, current_revision: Revision, ) -> MemoTableWithTypes<'_>
Return the memo table associated with
id. Read moreimpl SalsaValue for ModuleIdLt<'_>
impl Send for ModuleIdLt<'_>
impl<'db> StructuralPartialEq for ModuleIdLt<'db>
impl Sync for ModuleIdLt<'_>
Source§impl TrackedStructInDb for ModuleIdLt<'_>
impl TrackedStructInDb for ModuleIdLt<'_>
Source§fn database_key_index(zalsa: &Zalsa, id: Id) -> DatabaseKeyIndex
fn database_key_index(zalsa: &Zalsa, id: Id) -> DatabaseKeyIndex
Converts the identifier for this tracked struct into a
DatabaseKeyIndex.Auto Trait Implementations§
impl<'db> Freeze for ModuleIdLt<'db>
impl<'db> RefUnwindSafe for ModuleIdLt<'db>
impl<'db> Unpin for ModuleIdLt<'db>
impl<'db> UnsafeUnpin for ModuleIdLt<'db>
impl<'db> UnwindSafe for ModuleIdLt<'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
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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