Struct salsa_2022::key::DependencyIndex
source · [−]pub struct DependencyIndex { /* private fields */ }
Expand description
An integer that uniquely identifies a particular query instance within the database. Used to track dependencies between queries. Fully ordered and equatable but those orderings are arbitrary, and meant to be used only for inserting into maps and the like.
Implementations
sourceimpl DependencyIndex
impl DependencyIndex
pub fn ingredient_index(self) -> IngredientIndex
pub fn key_index(self) -> Option<Id>
Trait Implementations
sourceimpl Clone for DependencyIndex
impl Clone for DependencyIndex
sourcefn clone(&self) -> DependencyIndex
fn clone(&self) -> DependencyIndex
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for DependencyIndex
impl Debug for DependencyIndex
sourceimpl<Db> DebugWithDb<Db> for DependencyIndexwhere
Db: ?Sized + Database,
impl<Db> DebugWithDb<Db> for DependencyIndexwhere
Db: ?Sized + Database,
sourcefn fmt(&self, f: &mut Formatter<'_>, db: &Db, _include_all_fields: bool) -> Result
fn fmt(&self, f: &mut Formatter<'_>, db: &Db, _include_all_fields: bool) -> Result
if
include_all_fields
is false
only identity fields should be read, which means:
- for #[salsa::input] no fields
- for #[salsa::tracked] only fields with #[id]
attribute
- for #[salsa::interned] any field Read morefn debug<'me, 'db>(&'me self, db: &'me Db) -> DebugWith<'me, Db>where
Self: Sized + 'me,
fn debug_with<'me, 'db>(
&'me self,
db: &'me Db,
include_all_fields: bool
) -> DebugWith<'me, Db>where
Self: Sized + 'me,
sourcefn debug_all<'me, 'db>(&'me self, db: &'me Db) -> DebugWith<'me, Db>where
Self: Sized + 'me,
fn debug_all<'me, 'db>(&'me self, db: &'me Db) -> DebugWith<'me, Db>where
Self: Sized + 'me,
Be careful when using this method inside a tracked function,
because the default macro generated implementation will read all fields,
maybe introducing undesired dependencies. Read more
fn into_debug<'me, 'db>(self, db: &'me Db) -> DebugWith<'me, Db>where
Self: Sized + 'me,
sourceimpl From<DatabaseKeyIndex> for DependencyIndex
impl From<DatabaseKeyIndex> for DependencyIndex
sourcefn from(value: DatabaseKeyIndex) -> Self
fn from(value: DatabaseKeyIndex) -> Self
Converts to this type from the input type.
sourceimpl Hash for DependencyIndex
impl Hash for DependencyIndex
sourceimpl Ord for DependencyIndex
impl Ord for DependencyIndex
sourcefn cmp(&self, other: &DependencyIndex) -> Ordering
fn cmp(&self, other: &DependencyIndex) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<DependencyIndex> for DependencyIndex
impl PartialEq<DependencyIndex> for DependencyIndex
sourcefn eq(&self, other: &DependencyIndex) -> bool
fn eq(&self, other: &DependencyIndex) -> bool
sourceimpl PartialOrd<DependencyIndex> for DependencyIndex
impl PartialOrd<DependencyIndex> for DependencyIndex
sourcefn partial_cmp(&self, other: &DependencyIndex) -> Option<Ordering>
fn partial_cmp(&self, other: &DependencyIndex) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl TryFrom<DependencyIndex> for DatabaseKeyIndex
impl TryFrom<DependencyIndex> for DatabaseKeyIndex
impl Copy for DependencyIndex
impl Eq for DependencyIndex
impl StructuralEq for DependencyIndex
impl StructuralPartialEq for DependencyIndex
Auto Trait Implementations
impl RefUnwindSafe for DependencyIndex
impl Send for DependencyIndex
impl Sync for DependencyIndex
impl Unpin for DependencyIndex
impl UnwindSafe for DependencyIndex
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for Twhere
T: Hash + ?Sized,
impl<T> CallHasher for Twhere
T: Hash + ?Sized,
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.