pub struct PythonFile<'db>(/* private fields */);Expand description
A file paired with the Python version used to parse its contents.
This is the key for parsed::parsed_module. Including the Python version allows the same
file to be parsed for different versions within a single Salsa revision without sharing an
incompatible AST or syntax diagnostics.
Implementations§
Source§impl PythonFile<'static>
impl PythonFile<'static>
pub fn ingredient(zalsa: &Zalsa) -> &IngredientImpl<Self>
Source§impl<'db> PythonFile<'db>
impl<'db> PythonFile<'db>
Source§impl PythonFile<'_>
impl PythonFile<'_>
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)
Trait Implementations§
Source§impl<'db> Clone for PythonFile<'db>
impl<'db> Clone for PythonFile<'db>
Source§fn clone(&self) -> PythonFile<'db>
fn clone(&self) -> PythonFile<'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 PythonFile<'static>
impl Configuration for PythonFile<'static>
const LOCATION: Location
const DEBUG_NAME: &'static str = "PythonFile"
Source§type Fields<'a> = (File, PythonVersion)
type Fields<'a> = (File, PythonVersion)
The fields of the struct being interned.
Source§type Struct<'db> = PythonFile<'db>
type Struct<'db> = PythonFile<'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 PythonFile<'db>
Source§impl<'db> Debug for PythonFile<'db>
impl<'db> Debug for PythonFile<'db>
impl<'db> Eq for PythonFile<'db>
Source§impl GetSize for PythonFile<'_>
impl GetSize for PythonFile<'_>
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 PythonFile<'db>
impl<'db> HasJar for PythonFile<'db>
Source§impl<'db> Hash for PythonFile<'db>
impl<'db> Hash for PythonFile<'db>
Source§impl<'db> PartialEq for PythonFile<'db>
impl<'db> PartialEq for PythonFile<'db>
Source§impl<'db> SalsaStructInDb for PythonFile<'db>
impl<'db> SalsaStructInDb for PythonFile<'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 PythonFile<'db>
impl<'db> Send for PythonFile<'db>
impl<'db> StructuralPartialEq for PythonFile<'db>
impl<'db> Sync for PythonFile<'db>
Auto Trait Implementations§
impl<'db> Freeze for PythonFile<'db>
impl<'db> RefUnwindSafe for PythonFile<'db>
impl<'db> Unpin for PythonFile<'db>
impl<'db> UnsafeUnpin for PythonFile<'db>
impl<'db> UnwindSafe for PythonFile<'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