rustc_trait_selection::traits

Type Alias SelectionCache

Source
pub type SelectionCache<'tcx> = Cache<(ParamEnv<'tcx>, TraitPredicate<TyCtxt<'tcx>>), Result<Option<SelectionCandidate<'tcx>>, SelectionError<'tcx>>>;

Aliased Type§

struct SelectionCache<'tcx> { /* private fields */ }

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 40 bytes

Implementations

§

impl<Key, Value> Cache<Key, Value>

pub fn clear(&self)

Actually frees the underlying memory in contrast to what stdlib containers do on clear

§

impl<Key, Value> Cache<Key, Value>
where Key: Eq + Hash, Value: Clone,

pub fn get<Tcx>(&self, key: &Key, tcx: Tcx) -> Option<Value>
where Tcx: DepContext,

pub fn insert(&self, key: Key, dep_node: DepNodeIndex, value: Value)

Trait Implementations

§

impl<Key, Value> Clone for Cache<Key, Value>
where Key: Clone, Value: Clone,

§

fn clone(&self) -> Cache<Key, Value>

Returns a copy of the value. Read more
Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<Key, Value> Default for Cache<Key, Value>

§

fn default() -> Cache<Key, Value>

Returns the “default value” for a type. Read more