pub struct PythonLexicalScopeBindings { /* private fields */ }Expand description
Completed function binding facts without borrowed tree-sitter nodes. Retain these only under the identity of the exact source that produced them.
Implementations§
Source§impl PythonLexicalScopeBindings
impl PythonLexicalScopeBindings
pub fn name_resolution_at( &self, name: &str, reference: Node<'_>, ) -> PythonLexicalNameResolution
Sourcepub fn name_resolution_at_bounded(
&self,
name: &str,
reference: Node<'_>,
scope_step: impl FnMut() -> bool,
) -> Option<PythonLexicalNameResolution>
pub fn name_resolution_at_bounded( &self, name: &str, reference: Node<'_>, scope_step: impl FnMut() -> bool, ) -> Option<PythonLexicalNameResolution>
Resolve a read while charging every comprehension binding and iterable range inspected. Exhaustion is distinct from an unbound name.
Sourcepub fn has_global_binding_event(&self, name: &str) -> bool
pub fn has_global_binding_event(&self, name: &str) -> bool
A directive alone is not an event. Declarations, imports, assignments, and every other collected binder/delete count, without value inference.
Sourcepub fn global_binding_events(&self) -> impl Iterator<Item = &str>
pub fn global_binding_events(&self) -> impl Iterator<Item = &str>
All actual global binding events, before any read-time filtering. Callers that copy this set must charge their own bounded iteration.
pub fn resolves_to_local_function_bounded( &self, name: &str, reference: Node<'_>, scope_step: impl FnMut() -> bool, ) -> Option<bool>
Sourcepub fn has_runtime_callable_binding_at(
&self,
name: &str,
reference: Node<'_>,
) -> bool
pub fn has_runtime_callable_binding_at( &self, name: &str, reference: Node<'_>, ) -> bool
Whether the active callable obtains name from a runtime binding
rather than an untouched function or import declaration.
pub fn has_runtime_callable_binding_at_bounded( &self, name: &str, reference: Node<'_>, scope_step: impl FnMut() -> bool, ) -> Option<bool>
Auto Trait Implementations§
impl Freeze for PythonLexicalScopeBindings
impl RefUnwindSafe for PythonLexicalScopeBindings
impl Send for PythonLexicalScopeBindings
impl Sync for PythonLexicalScopeBindings
impl Unpin for PythonLexicalScopeBindings
impl UnsafeUnpin for PythonLexicalScopeBindings
impl UnwindSafe for PythonLexicalScopeBindings
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> 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