pub struct PythonModuleGlobalSourceFacts { /* private fields */ }Expand description
Syntax-only proof candidates for module-level initializer values.
This is deliberately separate from PythonFileSourceFacts: that type is
a read projection over persisted rows, while this value is derived from the
current parse tree and belongs in the analyzer’s generation/blob/file
cache. A returned range identifies only the RHS of a single, plain module
assignment; callers still classify that expression before using it.
Implementations§
Source§impl PythonModuleGlobalSourceFacts
impl PythonModuleGlobalSourceFacts
Sourcepub fn module_binds_name(&self, name: &str) -> bool
pub fn module_binds_name(&self, name: &str) -> bool
Whether any module-scope syntax binds this name.
Sourcepub fn initializer_range(&self, name: &str) -> Option<Range>
pub fn initializer_range(&self, name: &str) -> Option<Range>
The initializer’s RHS range only when every local syntactic proof holds.
Sourcepub fn estimated_retained_bytes(&self) -> usize
pub fn estimated_retained_bytes(&self) -> usize
Approximate retained bytes for the analyzer’s weighted per-file cache.
Trait Implementations§
Auto Trait Implementations§
impl Forget for PythonModuleGlobalSourceFacts
impl Freeze for PythonModuleGlobalSourceFactswhere
*const u8 is !null: Freeze,
PhantomData<(Box<str>, PythonModuleGlobalBindingFact)>: Freeze,
PhantomData<(Box<str>, ())>: Freeze,
PhantomData<usize>: Freeze,
impl Move for PythonModuleGlobalSourceFacts
impl RefUnwindSafe for PythonModuleGlobalSourceFacts
impl Send for PythonModuleGlobalSourceFacts
impl Sync for PythonModuleGlobalSourceFacts
impl Unpin for PythonModuleGlobalSourceFacts
impl UnsafeUnpin for PythonModuleGlobalSourceFactswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<(Box<str>, PythonModuleGlobalBindingFact)>: UnsafeUnpin,
PhantomData<(Box<str>, ())>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
impl UnwindSafe for PythonModuleGlobalSourceFactswhere
HashMap<Box<str>, PythonModuleGlobalBindingFact>: UnwindSafe,
NonNull<u8>: UnwindSafe,
BoxRaw<str>: UnwindSafe,
RawVecInner: UnwindSafe,
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<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