pub struct RootDatabase { /* private fields */ }

Implementations§

Trait Implementations§

Iterates through all query storage and removes any values that have not been used since the last revision was created. The intended use-cycle is that you first execute all of your “main” queries; this will ensure that all query values they consume are marked as used. You then invoke this method to remove other values that were not needed for your main query results.
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.
This function is invoked when a dependent query is being computed by the other thread, and that thread panics.
Gives access to the underlying salsa runtime.
Gives access to the underlying salsa runtime.
Upcast this type to a dyn Database.
Gives access to the underlying salsa runtime.
Gives access to the underlying salsa runtime.
Formats a database key index in a human readable fashion.
True if the computed value for input may have changed since revision.
Executes the callback for each kind of query.
Defines the “storage type”, where all the query data is kept. This type is defined by the database_storage macro.
Returns the “default value” for a type. Read more
Access the group storage struct from the database.
Access the group storage struct from the database.
Access the group storage struct from the database.
Access the group storage struct from the database.
Access the group storage struct from the database.
Access the group storage struct from the database.
Access the group storage struct from the database.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Gets the main file of the module. A module might have more virtual files generated by plugins.
Gets all the files of a module - main files and generated virtual files.
Gets a file from a module and a FileIndex (i.e. ModuleFileId).
Gets the directory of a module.
Main input of the project. Lists all the crates.
Set the value of the crate_roots input. Read more
Set the value of the crate_roots input and promise that its value will never change again. Read more
Overrides for file content. Mostly used by language server and tests. TODO(spapini): Currently, when this input changes, all the file_content() queries will be invalidated. Change this mechanism to hold file_overrides on the db struct outside salsa mechanism, and invalidate manually.
Set the value of the file_overrides input. Read more
Set the value of the file_overrides input and promise that its value will never change again. Read more
List of crates in the project.
Root directory of the crate.
Query for raw file contents. Private.
Query for the file contents. This takes overrides into consideration.
Overrides file content. None value removes the override.
Sets the root directory of the crate. None value removes the crate.

Returns the argument unchanged.

Calls U::from(self).

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

Computes the lowered representation of a function with a body.
Computes the lowered representation of a function with a body.
A concrete version of priv_function_with_body_lowered_flat
Computes the final lowered representation (after all the internal transformations).
Aggregates function level semantic diagnostics.
Aggregates module level semantic diagnostics.
Aggregates file level lowering diagnostics.
Returns the representative of the function’s strongly connected component. The representative is consistently chosen for all the functions in the same SCC.
Returns the explicit implicits required by all the functions in the SCC of this function. These are all the implicit parameters that are explicitly declared in the functions of the given function’s SCC. Read more
Returns all the implicit parameters that the function requires (according to both its signature and the functions it calls). The items in the returned vector are unique and the order is consistent, but not necessarily related to the order of the explicit implicits in the signature of the function.
Returns all the implicit parameters that a function with a body requires (according to both its signature and the functions it calls).
Returns all the implicit parameters that a function with a body requires (according to both its signature and the functions it calls). The items in the returned vector are unique and the order is consistent, but not necessarily related to the order of the explicit implicits in the signature of the function.
Returns whether the function may panic.
Returns whether the function may panic.
Returns all the functions in the same strongly connected component as the given function.
An array that sets the precedence of implicit types.
Set the value of the implicit_precedence input. Read more
Set the value of the implicit_precedence input and promise that its value will never change again. Read more
Should only be used internally. Parses a file and returns the result and the generated ParserDiagnostic.
Parses a file and returns its AST.
Returns the parser diagnostics for this file.
Retrieves the ConcreteVariant for a ConcreteEnumId and a Variant.
Retrieves all the ConcreteVariants for a ConcreteEnumId.
Private query to compute data about a constant definition.
Returns the semantic diagnostics of a constant definition.
Returns the semantic data of a constant definition.
Private query to compute data about a use.
Returns the semantic diagnostics of a use.
Returns the semantic diagnostics of a use.
Private query to compute data about the module.
Returns Maybe::Err if the module was not properly resolved. Returns [Maybe::Ok(Option::None)] if the item does not exist.
Returns the attributes of a module
Private query to compute data about a struct.
Returns the semantic diagnostics of a struct.
Returns the generic parameters of an enum.
Returns the members of a struct.
Returns the attributes of a struct.
Returns the resolution lookback of a struct.
Private query to compute data about an enum.
Returns the semantic diagnostics of an enum.
Returns the generic parameters of an enum.
Returns the members of an enum.
Returns the semantic model of a variant.
Returns the resolution lookback of an enum.
Private query to compute data about a type alias.
Returns the semantic diagnostics of a type alias.
Returns the resolved type of a type alias.
Returns the generic parameters of a type alias.
Returns the resolution lookback of a type alias.
Private query to compute data about a trait.
Returns the semantic diagnostics of a trait.
Returns the generic parameters of a trait.
Returns the attributes of a trait.
Returns the functions of a trait.
Returns the function with the given name of the given trait, if exists.
Private query to compute data about a trait function.
Returns the semantic diagnostics of a trait function.
Returns the signature of a trait function.
Returns the attributes of a trait function.
Returns the generic params of a trait function.
Returns the resolution lookback of a trait function.
Private query to compute declaration data about an impl.
Returns the semantic declaration diagnostics of an impl.
Returns the generic parameters of an impl.
Returns the resolution lookback of an impl.
Returns the concrete trait that is implemented by the impl.
Private query to compute data about an impl.
Returns the semantic definition diagnostics of an impl.
Returns the functions in the impl.
Returns the impl function that matches the given trait function, if exists. Note that a function that doesn’t exist in the impl doesn’t necessarily indicate an error, as, e.g., a trait function that has a default implementation doesn’t have to be implemented in the impl.
Returns the signature of an impl function.
Returns the explicit implicits of a signature of an impl function.
Returns the generic params of an impl function.
Returns the semantic diagnostics of an impl function’s declaration (signature).
Returns the resolution lookback of an impl function’s declaration.
Private query to compute data about an impl function declaration.
Returns the semantic diagnostics of an impl function definition (declaration + body).
Returns the definition of an impl function.
Returns the resolution lookback of an impl function’s definition.
Private query to compute data about an impl function definition (declaration + body)
Returns the semantic diagnostics of a free function’s declaration (signature).
Returns the signature of a free function.
Returns the explicit implicits of a signature of a free function.
Returns the generic params of a free function.
Returns the resolution lookback of a free function’s declaration.
Private query to compute data about a free function declaration - its signature excluding its body.
Returns the semantic diagnostics of a free function’s body.
Returns the resolution lookback of a free function’s body.
Private query to compute data about a free function’s body.
Returns the semantic diagnostics of a declaration (signature) of a function with a body.
Returns the signature of a function with a body.
Returns the generic params of a function with a body.
Returns the attributes of a function with a body.
Returns the semantic diagnostics of a body of a function (with a body).
Returns the body expr of a function (with a body).
Returns the body of a function (with a body).
Returns the set of direct callees of a function with a body.
Returns the set of direct callees which are functions with body of a function with a body (i.e. excluding libfunc callees).
Private query to compute data about an extern function declaration. An extern function has no body, and thus only has a declaration.
Returns the semantic diagnostics of an extern function declaration. An extern function has no body, and thus only has a declaration.
Returns the signature of an extern function.
Returns the generic params of an extern function.
Returns the explicit implicits of an extern function declaration.
Returns the ref parameters of an extern function declaration.
Returns the resolution lookback of an extern function.
Private query to compute data about an extern type declaration. An extern type has no body, and thus only has a declaration.
Returns the semantic diagnostics of an extern type declaration. An extern type has no body, and thus only has a declaration.
Returns the generic params of an extern type.
Returns the signature of the given FunctionSignatureId. This include free functions, extern functions, etc…
Returns the generic parameters of the given FunctionSignatureId. This include free functions, extern functions, etc…
Returns the signature of a concrete function. This include free functions, extern functions, etc…
Returns the generic_type of a generic function. This include free types, extern types, etc…
Returns the generic_type of a generic function. This include free types, extern types, etc…
Assumes function and expression are present.
Assumes function and statement are valid.
Aggregates module level semantic diagnostics.
Aggregates file level semantic diagnostics.
Set the value of the semantic_plugins input. Read more
Set the value of the semantic_plugins input and promise that its value will never change again. Read more
Creates a Sierra function id for a function id of the semantic model.
Returns the matching sierra concrete type id for a given semantic type id.
Returns the cairo_lang_sierra::program::FunctionSignature object for the given function id.
Returns the cairo_lang_sierra::extensions::types::TypeInfo object for the given type id.
Private query to compute Sierra data about a free function.
Returns the Sierra code (as pre_sierra::Function) for a given free function.
Returns true if the function calls (possibly indirectly) itself, or if it calls (possibly indirectly) such a function. For example, if f0 calls f1, f1 calls f2, f2 calls f3, and f3 calls f2, then Self::contains_cycle will return true for all of these functions.
Returns the ap change of a given function if it is known at compile time or SierraApChange::Unknown otherwise.
Returns the cairo_lang_sierra::program::Program object of the requested functions.
Returns the cairo_lang_sierra::program::Program object of the requested crates.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.