pub(crate) struct DefMapPair<'db>(Id, PhantomData<fn() -> &'db ()>);Tuple Fields§
§0: Id§1: PhantomData<fn() -> &'db ()>Implementations§
Source§impl DefMapPair<'static>
impl DefMapPair<'static>
pub fn ingredient(db: &dyn Database) -> &IngredientImpl<Self>
fn ingredient_(zalsa: &Zalsa) -> &IngredientImpl<Self>
Source§impl<'db> DefMapPair<'db>
impl<'db> DefMapPair<'db>
pub fn new<Db_>(db: &'db Db_, def_map: DefMap, local: LocalDefMap) -> Selfwhere
Db_: ?Sized + Database,
pub(crate) fn def_map<Db_>(self, db: &'db Db_) -> &'db DefMapwhere
Db_: ?Sized + Database,
pub(crate) fn local<Db_>(self, db: &'db Db_) -> &'db LocalDefMapwhere
Db_: ?Sized + Database,
Source§impl<'_db> DefMapPair<'_db>
impl<'_db> DefMapPair<'_db>
Sourcepub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Result
pub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Result
Default debug formatting for this struct (may be useful if you define your own Debug impl)
Trait Implementations§
Source§impl<'db> Clone for DefMapPair<'db>
impl<'db> Clone for DefMapPair<'db>
Source§fn clone(&self) -> DefMapPair<'db>
fn clone(&self) -> DefMapPair<'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 DefMapPair<'static>
impl Configuration for DefMapPair<'static>
const LOCATION: Location
Source§const DEBUG_NAME: &'static str = "DefMapPair"
const DEBUG_NAME: &'static str = "DefMapPair"
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> = (DefMap, LocalDefMap)
type Fields<'db> = (DefMap, LocalDefMap)
A (possibly empty) tuple of the fields for this struct.
type Revisions = [AtomicRevision; 1]
type Struct<'db> = DefMapPair<'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 DefMapPair<'db>
impl<'db> Eq for DefMapPair<'db>
Source§impl<'db> HasJar for DefMapPair<'db>
impl<'db> HasJar for DefMapPair<'db>
Source§impl<'db> Hash for DefMapPair<'db>
impl<'db> Hash for DefMapPair<'db>
Source§impl<'db> PartialEq for DefMapPair<'db>
impl<'db> PartialEq for DefMapPair<'db>
Source§impl SalsaStructInDb for DefMapPair<'_>
impl SalsaStructInDb for DefMapPair<'_>
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 DefMapPair<'_>
impl Send for DefMapPair<'_>
impl<'db> StructuralPartialEq for DefMapPair<'db>
impl Sync for DefMapPair<'_>
Source§impl TrackedStructInDb for DefMapPair<'_>
impl TrackedStructInDb for DefMapPair<'_>
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 DefMapPair<'db>
impl<'db> RefUnwindSafe for DefMapPair<'db>
impl<'db> Unpin for DefMapPair<'db>
impl<'db> UnsafeUnpin for DefMapPair<'db>
impl<'db> UnwindSafe for DefMapPair<'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> 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