pub struct WriteOnDropRustIrDatabase<I, W, DB, P = DB>where
    I: Interner,
    W: Write,
    DB: RustIrDatabase<I>,
    P: Borrow<DB>,
{ /* private fields */ }
Expand description

Wraps a RustIrDatabase, and, when dropped, writes out all used definition to the given file.

Uses LoggingRustIrDatabase internally.

Uses a separate type, P, for the database stored inside to account for Arc or wrapping other storage mediums.

Implementations

Trait Implementations

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more

Returns the generator witness datum for the generator with the given id.

Returns any “custom program clauses” that do not derive from Rust IR. Used only in testing the underlying solver. Read more
Returns the datum for the associated type with the given id.
Returns the datum for the definition with the given id.
Returns the datum for the ADT with the given id.
Returns the generator datum for the generator with the given id.
Returns the representation for the ADT definition with the given id.
Returns the siza and alignment of the ADT definition with the given id.
Returns the datum for the impl with the given id.
Returns the AssociatedTyValue with the given id.
Returns the OpaqueTyDatum with the given id.
Returns the “hidden type” corresponding with the opaque type.
Returns a list of potentially relevant impls for a given trait-id; we also supply the type parameters that we are trying to match (if known: these parameters may contain inference variables, for example). The implementor is permitted to return any superset of the applicable impls; chalk will narrow down the list to only those that truly apply. The parameters are provided as a “hint” to help the implementor do less work, but can be completely ignored if desired. Read more
Returns the impls that require coherence checking. This is not the full set of impls that exist: Read more
Returns true if there is an explicit impl of the auto trait auto_trait_id for the type ty. This is part of the auto trait handling – if there is no explicit impl given by the user for ty, then we provide default impls (otherwise, we rely on the impls the user gave). Read more
Returns id of a trait lang item, if found
Calculates program clauses from an env. This is intended to call the program_clauses_for_env function and then possibly cache the clauses. Read more
Check if a trait is object safe
Retrieves a trait’s original name. No uniqueness guarantees, but must a valid Rust identifier. Read more
Retrieves a struct’s original name. No uniqueness guarantees, but must a valid Rust identifier. Read more
Retrieves the name of an associated type. No uniqueness guarantees, but must a valid Rust identifier. Read more
Retrieves the name of an opaque type. No uniqueness guarantees, but must a valid Rust identifier. Read more
Returns the datum for the fn definition with the given id.
Retrieves the name of a function definition. No uniqueness guarantees, but must a valid Rust identifier. Read more
Gets the ClosureKind for a given closure and substitution.
Gets the inputs and output for a given closure id and substitution. We pass both the ClosureId and it’s Substituion to give implementors the freedom to store associated data in the substitution (like rustc) or separately (like chalk-integration). Read more
Gets the upvars as a Ty for a given closure id and substitution. There are no restrictions on the type of upvars. Read more
Gets the substitution for the closure when used as a function. For example, for the following (not-quite-)rust code: Read more
Gets the variances for the substitution of a fn def
Gets the variances for the substitution of a adt

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
Cast a value to type U using CastTo.

Returns the argument unchanged.

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

Calls U::from(self).

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

Given a projection of an associated type, split the type parameters into those that come from the trait and those that come from the associated type itself. So e.g. if you have (Iterator::Item)<F>, this would return ([F], []), since Iterator::Item is not generic and hence doesn’t have any type parameters itself. Read more
Given a projection <P0 as Trait<P1..Pn>>::Item<Pn..Pm>, returns the trait parameters [P0..Pn] (see split_projection). Read more
Given a projection <P0 as Trait<P1..Pn>>::Item<Pn..Pm>, returns the trait parameters [P0..Pn] (see split_projection). Read more
Given the full set of parameters (or binders) for an associated type value (which appears in an impl), splits them into the substitutions for the impl and those for the associated type. Read more
Given the full set of parameters for an associated type value (which appears in an impl), returns the trait reference and projection that are being satisfied by that value. Read more
Given the full set of parameters (or binders) for an associated type datum (the one appearing in a trait), splits them into the parameters for the trait and those for the associated type. Read more
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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more