Struct chalk_solve::logging_db::WriteOnDropRustIrDatabase [−][src]
pub struct WriteOnDropRustIrDatabase<I, W, DB, P = DB> where
I: Interner,
W: Write,
DB: RustIrDatabase<I>,
P: Borrow<DB>, { /* fields omitted */ }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
impl<I, W, DB, P> WriteOnDropRustIrDatabase<I, W, DB, P> where
I: Interner,
W: Write,
DB: RustIrDatabase<I>,
P: Borrow<DB>,
impl<I, W, DB, P> WriteOnDropRustIrDatabase<I, W, DB, P> where
I: Interner,
W: Write,
DB: RustIrDatabase<I>,
P: Borrow<DB>,
Trait Implementations
impl<I, W, DB, P> Debug for WriteOnDropRustIrDatabase<I, W, DB, P> where
I: Interner,
W: Write,
DB: RustIrDatabase<I>,
P: Borrow<DB> + Debug,
impl<I, W, DB, P> Debug for WriteOnDropRustIrDatabase<I, W, DB, P> where
I: Interner,
W: Write,
DB: RustIrDatabase<I>,
P: Borrow<DB> + Debug,
impl<I, W, DB, P> Drop for WriteOnDropRustIrDatabase<I, W, DB, P> where
I: Interner,
W: Write,
DB: RustIrDatabase<I>,
P: Borrow<DB>,
impl<I, W, DB, P> Drop for WriteOnDropRustIrDatabase<I, W, DB, P> where
I: Interner,
W: Write,
DB: RustIrDatabase<I>,
P: Borrow<DB>,
impl<I, W, DB, P> RustIrDatabase<I> for WriteOnDropRustIrDatabase<I, W, DB, P> where
I: Interner,
W: Write,
DB: RustIrDatabase<I>,
P: Borrow<DB> + Debug,
impl<I, W, DB, P> RustIrDatabase<I> for WriteOnDropRustIrDatabase<I, W, DB, P> where
I: Interner,
W: Write,
DB: RustIrDatabase<I>,
P: Borrow<DB> + Debug,
fn generator_witness_datum(
&self,
generator_id: GeneratorId<I>
) -> Arc<GeneratorWitnessDatum<I>>
fn generator_witness_datum(
&self,
generator_id: GeneratorId<I>
) -> Arc<GeneratorWitnessDatum<I>>
Returns the generator witness datum for the generator with the given id.
fn custom_clauses(&self) -> Vec<ProgramClause<I>>ⓘ
fn custom_clauses(&self) -> Vec<ProgramClause<I>>ⓘ
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 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.
fn impls_for_trait(
&self,
trait_id: TraitId<I>,
parameters: &[GenericArg<I>],
binders: &CanonicalVarKinds<I>
) -> Vec<ImplId<I>>ⓘ
fn impls_for_trait(
&self,
trait_id: TraitId<I>,
parameters: &[GenericArg<I>],
binders: &CanonicalVarKinds<I>
) -> Vec<ImplId<I>>ⓘ
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.
fn closure_inputs_and_output(
&self,
closure_id: ClosureId<I>,
substs: &Substitution<I>
) -> Binders<FnDefInputsAndOutputDatum<I>>
fn closure_inputs_and_output(
&self,
closure_id: ClosureId<I>,
substs: &Substitution<I>
) -> Binders<FnDefInputsAndOutputDatum<I>>
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
fn closure_upvars(
&self,
closure_id: ClosureId<I>,
substs: &Substitution<I>
) -> Binders<Ty<I>>
fn closure_upvars(
&self,
closure_id: ClosureId<I>,
substs: &Substitution<I>
) -> Binders<Ty<I>>
Gets the upvars as a Ty for a given closure id and substitution. There
are no restrictions on the type of upvars. Read more
fn closure_fn_substitution(
&self,
closure_id: ClosureId<I>,
substs: &Substitution<I>
) -> Substitution<I>
fn closure_fn_substitution(
&self,
closure_id: ClosureId<I>,
substs: &Substitution<I>
) -> Substitution<I>
Gets the substitution for the closure when used as a function. For example, for the following (not-quite-)rust code: Read more
impl<I, W, DB, P> UnificationDatabase<I> for WriteOnDropRustIrDatabase<I, W, DB, P> where
I: Interner,
W: Write,
DB: RustIrDatabase<I>,
P: Borrow<DB> + Debug,
impl<I, W, DB, P> UnificationDatabase<I> for WriteOnDropRustIrDatabase<I, W, DB, P> where
I: Interner,
W: Write,
DB: RustIrDatabase<I>,
P: Borrow<DB> + Debug,
Gets the variances for the substitution of a fn def
Gets the variances for the substitution of a adt
Auto Trait Implementations
impl<I, W, DB, P> RefUnwindSafe for WriteOnDropRustIrDatabase<I, W, DB, P> where
DB: RefUnwindSafe,
P: RefUnwindSafe,
W: RefUnwindSafe,
impl<I, W, DB, P> Send for WriteOnDropRustIrDatabase<I, W, DB, P> where
DB: Send,
P: Send,
W: Send,
<I as Interner>::DefId: Send,
<I as Interner>::InternedAdtId: Send,
impl<I, W, DB, P> Sync for WriteOnDropRustIrDatabase<I, W, DB, P> where
DB: Sync,
P: Sync,
W: Sync,
<I as Interner>::DefId: Send,
<I as Interner>::InternedAdtId: Send,
impl<I, W, DB, P> Unpin for WriteOnDropRustIrDatabase<I, W, DB, P> where
DB: Unpin,
P: Unpin,
W: Unpin,
impl<I, W, DB, P> UnwindSafe for WriteOnDropRustIrDatabase<I, W, DB, P> where
DB: UnwindSafe,
P: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
fn cast<U>(self, interner: &<U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: &<U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
Cast a value to type U using CastTo.
fn split_projection<'p>(
&self,
projection: &'p ProjectionTy<I>
) -> (Arc<AssociatedTyDatum<I>>, &'p [GenericArg<I>], &'p [GenericArg<I>])
fn split_projection<'p>(
&self,
projection: &'p ProjectionTy<I>
) -> (Arc<AssociatedTyDatum<I>>, &'p [GenericArg<I>], &'p [GenericArg<I>])
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
fn split_associated_ty_value_parameters<'p, P>(
&self,
parameters: &'p [P],
associated_ty_value: &AssociatedTyValue<I>
) -> (&'p [P], &'p [P])
fn split_associated_ty_value_parameters<'p, P>(
&self,
parameters: &'p [P],
associated_ty_value: &AssociatedTyValue<I>
) -> (&'p [P], &'p [P])
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
fn impl_parameters_and_projection_from_associated_ty_value<'p>(
&self,
parameters: &'p [GenericArg<I>],
associated_ty_value: &AssociatedTyValue<I>
) -> (&'p [GenericArg<I>], ProjectionTy<I>)
fn impl_parameters_and_projection_from_associated_ty_value<'p>(
&self,
parameters: &'p [GenericArg<I>],
associated_ty_value: &AssociatedTyValue<I>
) -> (&'p [GenericArg<I>], ProjectionTy<I>)
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
fn split_associated_ty_parameters<'p, P>(
&self,
parameters: &'p [P],
associated_ty_datum: &AssociatedTyDatum<I>
) -> (&'p [P], &'p [P])
fn split_associated_ty_parameters<'p, P>(
&self,
parameters: &'p [P],
associated_ty_datum: &AssociatedTyDatum<I>
) -> (&'p [P], &'p [P])
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
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