Struct Evaluator
pub struct Evaluator<'db> {Show 27 fields
db: &'db (dyn HirDatabase + 'static),
param_env: ParamEnvAndCrate<'db>,
target_data_layout: Arc<TargetDataLayout>,
stack: Vec<u8>,
heap: Vec<u8>,
code_stack: Vec<StackFrame>,
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, FxBuildHasher>>,
unused_locals_store: RefCell<HashMap<DefWithBodyId, Vec<Locals>, 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: Arc<TargetDataLayout>§stack: Vec<u8>§heap: Vec<u8>§code_stack: Vec<StackFrame>§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, FxBuildHasher>>§unused_locals_store: RefCell<HashMap<DefWithBodyId, Vec<Locals>, 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<'db> Evaluator<'db>
impl<'db> Evaluator<'db>
pub fn new( db: &'db (dyn HirDatabase + 'static), owner: DefWithBodyId, assert_placeholder_ty_is_unused: bool, trait_env: Option<ParamEnvAndCrate<'db>>, ) -> Result<Evaluator<'db>, MirEvalError>
Auto Trait Implementations§
impl<'db> !Freeze for Evaluator<'db>
impl<'db> !RefUnwindSafe for Evaluator<'db>
impl<'db> !Send for Evaluator<'db>
impl<'db> !Sync for Evaluator<'db>
impl<'db> Unpin for Evaluator<'db>
impl<'db> !UnwindSafe for Evaluator<'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