pub struct ResolverEnvironment<'db>(/* private fields */);Expand description
The Python version and search paths used to resolve modules.
Implementations§
Source§impl ResolverEnvironment<'static>
impl ResolverEnvironment<'static>
pub fn ingredient(zalsa: &Zalsa) -> &IngredientImpl<Self>
Source§impl<'db> ResolverEnvironment<'db>
impl<'db> ResolverEnvironment<'db>
pub fn new<Db_, T0: Lookup<PythonVersion> + Hash, T1: Lookup<SearchPaths> + Hash>( db: &'db Db_, python_version: T0, search_paths: T1, ) -> Self
pub fn python_version<Db_>(self, db: &'db Db_) -> PythonVersion
pub fn search_paths<Db_>(self, db: &'db Db_) -> &'db SearchPaths
Source§impl ResolverEnvironment<'_>
impl ResolverEnvironment<'_>
Sourcepub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Result
pub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Result
Default debug formatting for this struct (may be useful if you define your own Debug impl)
Source§impl<'db> ResolverEnvironment<'db>
impl<'db> ResolverEnvironment<'db>
pub fn display_search_paths( self, db: &'db dyn Db, mode: ModuleResolveMode, ) -> impl Display
Trait Implementations§
Source§impl<'db> Clone for ResolverEnvironment<'db>
impl<'db> Clone for ResolverEnvironment<'db>
Source§fn clone(&self) -> ResolverEnvironment<'db>
fn clone(&self) -> ResolverEnvironment<'db>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Configuration for ResolverEnvironment<'static>
impl Configuration for ResolverEnvironment<'static>
const LOCATION: Location
const DEBUG_NAME: &'static str = "ResolverEnvironment"
Source§type Fields<'a> = (PythonVersion, SearchPaths)
type Fields<'a> = (PythonVersion, SearchPaths)
The fields of the struct being interned.
Source§type Struct<'db> = ResolverEnvironment<'db>
type Struct<'db> = ResolverEnvironment<'db>
The end user struct
Source§fn heap_size(value: &Self::Fields<'_>) -> Option<usize>
fn heap_size(value: &Self::Fields<'_>) -> Option<usize>
Returns the size of any heap allocations in the output value, in bytes.
Source§fn serialize<S: Serializer>(
fields: &Self::Fields<'_>,
serializer: S,
) -> Result<S::Ok, S::Error>
fn serialize<S: Serializer>( fields: &Self::Fields<'_>, serializer: S, ) -> Result<S::Ok, S::Error>
Serialize the fields using
serde. Read moreSource§fn deserialize<'de, D: Deserializer<'de>>(
deserializer: D,
) -> Result<Self::Fields<'static>, D::Error>
fn deserialize<'de, D: Deserializer<'de>>( deserializer: D, ) -> Result<Self::Fields<'static>, D::Error>
Deserialize the fields using
serde. Read moreconst REVISIONS: NonZero<usize> = _
impl<'db> Copy for ResolverEnvironment<'db>
Source§impl<'db> Debug for ResolverEnvironment<'db>
impl<'db> Debug for ResolverEnvironment<'db>
impl<'db> Eq for ResolverEnvironment<'db>
Source§impl GetSize for ResolverEnvironment<'_>
impl GetSize for ResolverEnvironment<'_>
Source§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
Source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
Source§fn get_heap_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
fn get_heap_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
Determines how many bytes this object occupies inside the heap while using a
tracker. Read moreSource§fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
Determines the total size of the object while using a
tracker. Read moreSource§impl<'db> HasJar for ResolverEnvironment<'db>
impl<'db> HasJar for ResolverEnvironment<'db>
Source§impl<'db> Hash for ResolverEnvironment<'db>
impl<'db> Hash for ResolverEnvironment<'db>
Source§impl<'db> PartialEq for ResolverEnvironment<'db>
impl<'db> PartialEq for ResolverEnvironment<'db>
Source§impl<'db> SalsaStructInDb for ResolverEnvironment<'db>
impl<'db> SalsaStructInDb for ResolverEnvironment<'db>
Source§const LEAF_TYPE_IDS: &'static [ConstTypeId]
const LEAF_TYPE_IDS: &'static [ConstTypeId]
The type IDs of all concrete (leaf) salsa struct types that this type can contain. Read more
type MemoIngredientMap = MemoIngredientSingletonIndex
Source§fn lookup_ingredient_index(aux: &Zalsa) -> IngredientIndices
fn lookup_ingredient_index(aux: &Zalsa) -> IngredientIndices
Lookup or create ingredient indices. Read more
Source§fn entries(zalsa: &Zalsa) -> impl Iterator<Item = DatabaseKeyIndex> + '_
fn entries(zalsa: &Zalsa) -> impl Iterator<Item = DatabaseKeyIndex> + '_
Returns the IDs of any instances of this struct in the database.
impl<'db> SalsaValue for ResolverEnvironment<'db>
impl<'db> Send for ResolverEnvironment<'db>
impl<'db> StructuralPartialEq for ResolverEnvironment<'db>
impl<'db> Sync for ResolverEnvironment<'db>
Auto Trait Implementations§
impl<'db> Freeze for ResolverEnvironment<'db>
impl<'db> RefUnwindSafe for ResolverEnvironment<'db>
impl<'db> Unpin for ResolverEnvironment<'db>
impl<'db> UnsafeUnpin for ResolverEnvironment<'db>
impl<'db> UnwindSafe for ResolverEnvironment<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> HashEqLike<&T> for T
impl<T> HashEqLike<&T> for T
Source§impl<T> HashEqLike<Cow<'_, T>> for T
impl<T> HashEqLike<Cow<'_, T>> for T
Source§impl<T> HashEqLike<T> for T
impl<T> HashEqLike<T> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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