Struct srclang::analyzer::db::Database
pub struct Database { /* private fields */ }
The salsa database for the compiler.
Trait Implementations
impl AsSalsaDatabase for Database
fn as_salsa_database(&self) -> &dyn Database
impl Database for Database
fn salsa_event(&self, event: Event)
This function is invoked at key points in the salsa runtime. It permits the database to be customized and to inject logging or other custom behavior. Read more
fn synthetic_write(&mut self, durability: Durability)
A “synthetic write” causes the system to act as though some input of durability durability
has changed. This is mostly useful for profiling scenarios. Read more
fn report_untracked_read(&self)
Reports that the query depends on some state unknown to salsa. Read more
impl DbWithJar<Jar> for Database
fn as_jar_db<'db>(&'db self) -> &'db <Jar as Jar<'db>>::DynDbwhere 'db: 'db,
impl Default for Database
fn default() -> Database
Returns the “default value” for a type. Read more
impl HasJar<Jar> for Database
fn jar(&self) -> (&Jar, &Runtime)
fn jar_mut(&mut self) -> (&mut Jar, &mut Runtime)
impl HasJars for Database
type Jars = (Jar,)
fn jars(&self) -> (&Self::Jars, &Runtime)
fn jars_mut(&mut self) -> (&mut Self::Jars, &mut Runtime)
Gets mutable access to the jars. This will trigger a new revision and it will also cancel any ongoing work in the current revision.
fn create_jars(routes: &mut Routes<Self>) -> Box<Self::Jars>
impl HasJarsDyn for Database
fn runtime(&self) -> &Runtime
fn runtime_mut(&mut self) -> &mut Runtime
fn maybe_changed_after( &self, input: DependencyIndex, revision: Revision) -> bool
fn cycle_recovery_strategy( &self, ingredient_index: IngredientIndex) -> CycleRecoveryStrategy
fn origin(&self, index: DatabaseKeyIndex) -> Option<QueryOrigin>
fn mark_validated_output( &self, executor: DatabaseKeyIndex, output: DependencyIndex)
fn remove_stale_output( &self, executor: DatabaseKeyIndex, stale_output: DependencyIndex)
Invoked when executor
used to output stale_output
but no longer does. This method routes that into a call to the remove_stale_output
method on the ingredient for stale_output
.
fn salsa_struct_deleted(&self, ingredient: IngredientIndex, id: Id)
Informs ingredient
that the salsa struct with id id
has been deleted. This means that id
will not be used in this revision and hence any memoized values keyed by that struct can be discarded. Read more
fn fmt_index(&self, index: DependencyIndex, fmt: &mut Formatter<'_>) -> Result
impl JarFromJars<Jar> for Database
fn jar_from_jars<'db>(jars: &Self::Jars) -> &Jar
fn jar_from_jars_mut<'db>(jars: &mut Self::Jars) -> &mut Jar
impl ParallelDatabase for Database
fn snapshot(&self) -> Snapshot<Self>
Creates a second handle to the database that holds the database fixed at a particular revision. So long as this “frozen” handle exists, any attempt to set
an input will block. Read more
Auto Trait Implementations
impl !Freeze for Database
impl !RefUnwindSafe for Database
impl Send for Database
impl !Sync for Database
impl Unpin for Database
impl !UnwindSafe for Database
Blanket Implementations
impl<T> Any for Twhere T: 'static + ?Sized,
fn type_id(&self) -> TypeId
Gets the TypeId
of self
. Read more
impl<T> Borrow<T> for Twhere T: ?Sized,
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T> BorrowMut<T> for Twhere T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> From<T> for T
fn from(t: T) -> T
Returns the argument unchanged.
impl<T, U> Into<U> for Twhere U: From<T>,
fn into(self) -> U
Calls U::from(self)
.
That is, this conversion is whatever the implementation of From<T> for U
chooses to do.
impl<T> Pointable for T
const ALIGN: usize = _
The alignment of pointer.
type Init = T
The type for initializers.
unsafe fn init(init: <T as Pointable>::Init) -> usize
Initializes a with the given initializer. Read more
unsafe fn deref<'a>(ptr: usize) -> &'a T
Dereferences the given pointer. Read more
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
Mutably dereferences the given pointer. Read more
unsafe fn drop(ptr: usize)
Drops the object pointed to by the given pointer. Read more
impl<T, U> TryFrom<U> for Twhere U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
Performs the conversion.
impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
Performs the conversion.