Struct Evaluator
pub struct Evaluator<'a, 'db> {Show 27 fields
db: &'db (dyn HirDatabase + 'static),
param_env: ParamEnvAndCrate<'db>,
target_data_layout: &'db TargetDataLayout,
stack: Vec<u8>,
heap: Vec<u8>,
code_stack: Vec<StackFrame<'a>>,
static_locations: HashMap<StaticId, Address, FxBuildHasher>,
vtable_map: VTableMap<'db>,
thread_local_storage: TlsData,
random_state: Rand64,
stdout: Vec<u8>,
stderr: Vec<u8>,
layout_cache: RefCell<HashMap<Ty<'db>, Arc<LayoutData<RustcFieldIdx, RustcEnumVariantIdx>>, FxBuildHasher>>,
projected_ty_cache: RefCell<HashMap<(Ty<'db>, ProjectionElem<Idx<Local>>), Ty<'db>, FxBuildHasher>>,
not_special_fn_cache: RefCell<HashSet<FunctionId, FxBuildHasher>>,
mir_or_dyn_index_cache: RefCell<HashMap<(FunctionId, GenericArgs<'db>), MirOrDynIndex<'a>, FxBuildHasher>>,
unused_locals_store: RefCell<HashMap<InferBodyId, Vec<Locals<'a>>, FxBuildHasher>>,
cached_ptr_size: usize,
cached_fn_trait_func: Option<FunctionId>,
cached_fn_mut_trait_func: Option<FunctionId>,
cached_fn_once_trait_func: Option<FunctionId>,
crate_id: Crate,
assert_placeholder_ty_is_unused: bool,
execution_limit: usize,
stack_depth_limit: usize,
memory_limit: usize,
infcx: InferCtxt<'db>,
}Fields§
§db: &'db (dyn HirDatabase + 'static)§param_env: ParamEnvAndCrate<'db>§target_data_layout: &'db TargetDataLayout§stack: Vec<u8>§heap: Vec<u8>§code_stack: Vec<StackFrame<'a>>§static_locations: HashMap<StaticId, Address, FxBuildHasher>§vtable_map: VTableMap<'db>§thread_local_storage: TlsData§random_state: Rand64§stdout: Vec<u8>§stderr: Vec<u8>§layout_cache: RefCell<HashMap<Ty<'db>, Arc<LayoutData<RustcFieldIdx, RustcEnumVariantIdx>>, FxBuildHasher>>§projected_ty_cache: RefCell<HashMap<(Ty<'db>, ProjectionElem<Idx<Local>>), Ty<'db>, FxBuildHasher>>§not_special_fn_cache: RefCell<HashSet<FunctionId, FxBuildHasher>>§mir_or_dyn_index_cache: RefCell<HashMap<(FunctionId, GenericArgs<'db>), MirOrDynIndex<'a>, FxBuildHasher>>§unused_locals_store: RefCell<HashMap<InferBodyId, Vec<Locals<'a>>, FxBuildHasher>>§cached_ptr_size: usize§cached_fn_trait_func: Option<FunctionId>§cached_fn_mut_trait_func: Option<FunctionId>§cached_fn_once_trait_func: Option<FunctionId>§crate_id: Crate§assert_placeholder_ty_is_unused: bool§execution_limit: usize§stack_depth_limit: usize§memory_limit: usize§infcx: InferCtxt<'db>Implementations§
§impl<'a, 'db> Evaluator<'a, 'db>where
'db: 'a,
impl<'a, 'db> Evaluator<'a, 'db>where
'db: 'a,
pub fn new( db: &'db (dyn HirDatabase + 'static), owner: InferBodyId, assert_placeholder_ty_is_unused: bool, trait_env: Option<ParamEnvAndCrate<'db>>, ) -> Result<Evaluator<'a, 'db>, MirEvalError>
Auto Trait Implementations§
impl<'a, 'db> !Freeze for Evaluator<'a, 'db>
impl<'a, 'db> !RefUnwindSafe for Evaluator<'a, 'db>
impl<'a, 'db> !Send for Evaluator<'a, 'db>
impl<'a, 'db> !Sync for Evaluator<'a, 'db>
impl<'a, 'db> Unpin for Evaluator<'a, 'db>
impl<'a, 'db> UnsafeUnpin for Evaluator<'a, 'db>
impl<'a, 'db> !UnwindSafe for Evaluator<'a, 'db>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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