Skip to main content

RootDatabase

Struct RootDatabase 

Source
pub struct RootDatabase { /* private fields */ }

Trait Implementations§

Source§

impl Database for RootDatabase

Source§

fn salsa_event(&self, event_fn: 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.
Source§

fn unwind_if_cancelled(&self)

Starts unwinding the stack if the current revision is cancelled. Read more
Source§

fn salsa_runtime(&self) -> &Runtime

Gives access to the underlying salsa runtime. Read more
Source§

fn salsa_runtime_mut(&mut self) -> &mut Runtime

Gives access to the underlying salsa runtime. Read more
Source§

impl DatabaseOps for RootDatabase

Source§

fn ops_database(&self) -> &dyn Database

Upcast this type to a dyn Database.
Source§

fn ops_salsa_runtime(&self) -> &Runtime

Gives access to the underlying salsa runtime.
Source§

fn ops_salsa_runtime_mut(&mut self) -> &mut Runtime

Gives access to the underlying salsa runtime.
Source§

fn fmt_index(&self, input: DatabaseKeyIndex, fmt: &mut Formatter<'_>) -> Result

Formats a database key index in a human readable fashion.
Source§

fn maybe_changed_since( &self, input: DatabaseKeyIndex, revision: Revision, ) -> bool

True if the computed value for input may have changed since revision.
Source§

fn for_each_query(&self, op: &mut dyn FnMut(&dyn QueryStorageMassOps))

Executes the callback for each kind of query.
Source§

impl DatabaseStorageTypes for RootDatabase

Source§

type DatabaseStorage = __SalsaDatabaseStorage

Defines the “storage type”, where all the query data is kept. This type is defined by the database_storage macro.
Source§

impl Debug for RootDatabase

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RootDatabase

Source§

fn default() -> RootDatabase

Returns the “default value” for a type. Read more
Source§

impl HasQueryGroup<RirDatabaseStorage> for RootDatabase

Source§

fn group_storage(&self) -> &<RirDatabaseStorage as QueryGroup>::GroupStorage

Access the group storage struct from the database.
Source§

impl ParallelDatabase for RootDatabase

Source§

fn snapshot(&self) -> Snapshot<RootDatabase>

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<DB> RirDatabase for DB
where DB: Database + HasQueryGroup<RirDatabaseStorage>,

Source§

fn nodes(&self) -> Arc<HashMap<DefId, Node, BuildHasherDefault<FxHasher>>>

Source§

fn set_nodes( &mut self, value__: Arc<HashMap<DefId, Node, BuildHasherDefault<FxHasher>>>, )

Set the value of the nodes input. Read more
Source§

fn set_nodes_with_durability( &mut self, value__: Arc<HashMap<DefId, Node, BuildHasherDefault<FxHasher>>>, durability__: Durability, )

Set the value of the nodes input and promise that its value will never change again. Read more
Source§

fn files(&self) -> Arc<HashMap<FileId, Arc<File>, BuildHasherDefault<FxHasher>>>

Source§

fn set_files( &mut self, value__: Arc<HashMap<FileId, Arc<File>, BuildHasherDefault<FxHasher>>>, )

Set the value of the files input. Read more
Source§

fn set_files_with_durability( &mut self, value__: Arc<HashMap<FileId, Arc<File>, BuildHasherDefault<FxHasher>>>, durability__: Durability, )

Set the value of the files input and promise that its value will never change again. Read more
Source§

fn file_ids_map( &self, ) -> Arc<HashMap<Arc<PathBuf>, FileId, BuildHasherDefault<FxHasher>>>

Source§

fn set_file_ids_map( &mut self, value__: Arc<HashMap<Arc<PathBuf>, FileId, BuildHasherDefault<FxHasher>>>, )

Set the value of the file_ids_map input. Read more
Source§

fn set_file_ids_map_with_durability( &mut self, value__: Arc<HashMap<Arc<PathBuf>, FileId, BuildHasherDefault<FxHasher>>>, durability__: Durability, )

Set the value of the file_ids_map input and promise that its value will never change again. Read more
Source§

fn type_graph(&self) -> Arc<TypeGraph>

Source§

fn set_type_graph(&mut self, value__: Arc<TypeGraph>)

Set the value of the type_graph input. Read more
Source§

fn set_type_graph_with_durability( &mut self, value__: Arc<TypeGraph>, durability__: Durability, )

Set the value of the type_graph input and promise that its value will never change again. Read more
Source§

fn tags_map( &self, ) -> Arc<HashMap<TagId, Arc<Tags>, BuildHasherDefault<FxHasher>>>

Source§

fn set_tags_map( &mut self, value__: Arc<HashMap<TagId, Arc<Tags>, BuildHasherDefault<FxHasher>>>, )

Set the value of the tags_map input. Read more
Source§

fn set_tags_map_with_durability( &mut self, value__: Arc<HashMap<TagId, Arc<Tags>, BuildHasherDefault<FxHasher>>>, durability__: Durability, )

Set the value of the tags_map input and promise that its value will never change again. Read more
Source§

fn input_files(&self) -> Arc<Vec<FileId>>

Source§

fn set_input_files(&mut self, value__: Arc<Vec<FileId>>)

Set the value of the input_files input. Read more
Source§

fn set_input_files_with_durability( &mut self, value__: Arc<Vec<FileId>>, durability__: Durability, )

Set the value of the input_files input and promise that its value will never change again. Read more
Source§

fn node(&self, def_id: DefId) -> Option<Node>

Source§

fn file(&self, file_id: FileId) -> Option<Arc<File>>

Source§

fn item(&self, def_id: DefId) -> Option<Arc<Item>>

Source§

fn expect_item(&self, def_id: DefId) -> Arc<Item>

Source§

fn codegen_item_ty(&self, ty: TyKind) -> CodegenTy

Source§

fn codegen_const_ty(&self, ty: TyKind) -> CodegenTy

Source§

fn codegen_ty(&self, def_id: DefId) -> CodegenTy

Source§

fn service_methods(&self, def_id: DefId) -> Arc<[Arc<Method>]>

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more