Skip to main content

PythonVisitor

Struct PythonVisitor 

Source
pub struct PythonVisitor<'source, 'parsed, 'structural>
where 'source: 'structural,
{ pub file: &'parsed ProjectFile, pub source: &'source str, pub package_name: &'parsed str, pub parsed: &'parsed mut ParsedFile, pub module: Option<CodeUnit>, /* private fields */ }

Fields§

§file: &'parsed ProjectFile§source: &'source str§package_name: &'parsed str§parsed: &'parsed mut ParsedFile§module: Option<CodeUnit>

Implementations§

Source§

impl<'source, 'parsed, 'structural> PythonVisitor<'source, 'parsed, 'structural>
where 'source: 'structural,

Source

pub fn visit_container( &mut self, node: Node<'structural>, scope: &[Scope], module_control_depth: usize, )

Auto Trait Implementations§

§

impl<'source, 'parsed, 'structural> !RefUnwindSafe for PythonVisitor<'source, 'parsed, 'structural>

§

impl<'source, 'parsed, 'structural> !Send for PythonVisitor<'source, 'parsed, 'structural>

§

impl<'source, 'parsed, 'structural> !Sync for PythonVisitor<'source, 'parsed, 'structural>

§

impl<'source, 'parsed, 'structural> !UnwindSafe for PythonVisitor<'source, 'parsed, 'structural>

§

impl<'source, 'parsed, 'structural> Forget for PythonVisitor<'source, 'parsed, 'structural>

§

impl<'source, 'parsed, 'structural> Freeze for PythonVisitor<'source, 'parsed, 'structural>
where &'parsed ProjectFile: Freeze, &'source str: Freeze, &'parsed str: Freeze, &'parsed FqName: Freeze, &'parsed mut ParsedFile: Freeze, *const ArcInner<CodeUnitInner> is !null: Freeze, PhantomData<ArcInner<CodeUnitInner>>: Freeze, *const u8 is !null: Freeze, PhantomData<(String, ())>: Freeze, PhantomData<usize>: Freeze, PhantomData<SourceOccurrence>: Freeze, PhantomData<SourceDeclaration>: Freeze, PhantomData<(SourceDeclarationId, SourceLexicalDeclarationFact)>: Freeze, PhantomData<(usize, SourceOccurrenceId)>: Freeze, PhantomData<((SourceOccurrenceId, Option<SourceOccurrenceId>), SourceDeclarationId)>: Freeze, &'structural (dyn StructuralSpec + 'static): Freeze, &'structural dyn StructuralFileHooks<'structural>: Freeze, &'structural str: Freeze, &'structural CallSiteContext: Freeze, PhantomData<(usize, Node<'structural>)>: Freeze, &'structural CancellationToken: Freeze, PhantomData<NormalizedNode>: Freeze, PhantomData<Span>: Freeze, PhantomData<(usize, u32)>: Freeze, PhantomData<Vec<PendingRoleTarget>>: Freeze, PhantomData<PendingOccurrence>: Freeze, PhantomData<(u32, Role, RoleCoverage, Option<Span>)>: Freeze, &'structural CompiledKinds: Freeze, PhantomData<Option<u32>>: Freeze, PhantomData<SourceImportFact>: Freeze, PhantomData<SourceImportId>: Freeze, PhantomData<(SourceDeclarationId, CodeUnit)>: Freeze, PhantomData<(CodeUnit, (SourceDeclarationId, CodeUnit))>: Freeze, PhantomData<(CodeUnit, ())>: Freeze, PhantomData<PythonCallableReturnFact>: Freeze, PhantomData<(usize, usize)>: Freeze, PhantomData<(CodeUnit, usize, Vec<PythonOverloadDecoratorName>)>: Freeze,

§

impl<'source, 'parsed, 'structural> Move for PythonVisitor<'source, 'parsed, 'structural>

§

impl<'source, 'parsed, 'structural> Unpin for PythonVisitor<'source, 'parsed, 'structural>
where &'parsed ProjectFile: Unpin, &'source str: Unpin, &'parsed str: Unpin, &'parsed FqName: Unpin, &'parsed mut ParsedFile: Unpin, Arc<CodeUnitInner>: Unpin, *const u8 is !null: Unpin, &'structural (dyn StructuralSpec + 'static): Unpin, &'structural dyn StructuralFileHooks<'structural>: Unpin, &'structural str: Unpin, &'structural CallSiteContext: Unpin, *const c_void: Unpin, *const TSTree: Unpin, &'structural (): Unpin, &'structural CancellationToken: Unpin, &'structural CompiledKinds: Unpin,

§

impl<'source, 'parsed, 'structural> UnsafeUnpin for PythonVisitor<'source, 'parsed, 'structural>
where &'parsed ProjectFile: UnsafeUnpin, &'source str: UnsafeUnpin, &'parsed str: UnsafeUnpin, &'parsed FqName: UnsafeUnpin, &'parsed mut ParsedFile: UnsafeUnpin, *const ArcInner<CodeUnitInner> is !null: UnsafeUnpin, PhantomData<ArcInner<CodeUnitInner>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<(String, ())>: UnsafeUnpin, PhantomData<usize>: UnsafeUnpin, PhantomData<SourceOccurrence>: UnsafeUnpin, PhantomData<SourceDeclaration>: UnsafeUnpin, PhantomData<(SourceDeclarationId, SourceLexicalDeclarationFact)>: UnsafeUnpin, PhantomData<(usize, SourceOccurrenceId)>: UnsafeUnpin, PhantomData<((SourceOccurrenceId, Option<SourceOccurrenceId>), SourceDeclarationId)>: UnsafeUnpin, &'structural (dyn StructuralSpec + 'static): UnsafeUnpin, &'structural dyn StructuralFileHooks<'structural>: UnsafeUnpin, &'structural str: UnsafeUnpin, &'structural CallSiteContext: UnsafeUnpin, PhantomData<(usize, Node<'structural>)>: UnsafeUnpin, &'structural CancellationToken: UnsafeUnpin, PhantomData<NormalizedNode>: UnsafeUnpin, PhantomData<Span>: UnsafeUnpin, PhantomData<(usize, u32)>: UnsafeUnpin, PhantomData<Vec<PendingRoleTarget>>: UnsafeUnpin, PhantomData<PendingOccurrence>: UnsafeUnpin, PhantomData<(u32, Role, RoleCoverage, Option<Span>)>: UnsafeUnpin, &'structural CompiledKinds: UnsafeUnpin, PhantomData<Option<u32>>: UnsafeUnpin, PhantomData<SourceImportFact>: UnsafeUnpin, PhantomData<SourceImportId>: UnsafeUnpin, PhantomData<(SourceDeclarationId, CodeUnit)>: UnsafeUnpin, PhantomData<(CodeUnit, (SourceDeclarationId, CodeUnit))>: UnsafeUnpin, PhantomData<(CodeUnit, ())>: UnsafeUnpin, PhantomData<PythonCallableReturnFact>: UnsafeUnpin, PhantomData<(usize, usize)>: UnsafeUnpin, PhantomData<(CodeUnit, usize, Vec<PythonOverloadDecoratorName>)>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CapabilityProvider for T
where T: Any,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more