Skip to main content

StoredNameFinder

Struct StoredNameFinder 

Source
pub struct StoredNameFinder<'a> {
    pub names: HashMap<&'a str, &'a ExprName, FxBuildHasher>,
}
Expand description

A Visitor to collect all stored Expr::Name nodes in an AST.

Fields§

§names: HashMap<&'a str, &'a ExprName, FxBuildHasher>

A map from identifier to defining expression.

Trait Implementations§

Source§

impl<'a> Debug for StoredNameFinder<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'a> Default for StoredNameFinder<'a>

Source§

fn default() -> StoredNameFinder<'a>

Returns the “default value” for a type. Read more
Source§

impl<'a> Visitor<'a> for StoredNameFinder<'a>

Source§

fn visit_expr(&mut self, expr: &'a Expr)

Source§

fn visit_stmt(&mut self, stmt: &'a Stmt)

Source§

fn visit_annotation(&mut self, expr: &'a Expr)

Source§

fn visit_decorator(&mut self, decorator: &'a Decorator)

Source§

fn visit_expr_context(&mut self, expr_context: &'a ExprContext)

Source§

fn visit_bool_op(&mut self, bool_op: &'a BoolOp)

Source§

fn visit_operator(&mut self, operator: &'a Operator)

Source§

fn visit_unary_op(&mut self, unary_op: &'a UnaryOp)

Source§

fn visit_cmp_op(&mut self, cmp_op: &'a CmpOp)

Source§

fn visit_comprehension(&mut self, comprehension: &'a Comprehension)

Source§

fn visit_except_handler(&mut self, except_handler: &'a ExceptHandler)

Source§

fn visit_arguments(&mut self, arguments: &'a Arguments)

Source§

fn visit_parameters(&mut self, parameters: &'a Parameters)

Source§

fn visit_parameter(&mut self, parameter: &'a Parameter)

Source§

fn visit_keyword(&mut self, keyword: &'a Keyword)

Source§

fn visit_alias(&mut self, alias: &'a Alias)

Source§

fn visit_with_item(&mut self, with_item: &'a WithItem)

Source§

fn visit_type_params(&mut self, type_params: &'a TypeParams)

Source§

fn visit_type_param(&mut self, type_param: &'a TypeParam)

Source§

fn visit_match_case(&mut self, match_case: &'a MatchCase)

Source§

fn visit_pattern(&mut self, pattern: &'a Pattern)

Source§

fn visit_pattern_arguments(&mut self, pattern_arguments: &'a PatternArguments)

Source§

fn visit_pattern_keyword(&mut self, pattern_keyword: &'a PatternKeyword)

Source§

fn visit_body(&mut self, body: &'a [Stmt])

Source§

fn visit_elif_else_clause(&mut self, elif_else_clause: &'a ElifElseClause)

Source§

fn visit_f_string(&mut self, f_string: &'a FString)

Source§

fn visit_interpolated_string_element( &mut self, interpolated_string_element: &'a InterpolatedStringElement, )

Source§

fn visit_t_string(&mut self, t_string: &'a TString)

Source§

fn visit_string_literal(&mut self, string_literal: &'a StringLiteral)

Source§

fn visit_bytes_literal(&mut self, bytes_literal: &'a BytesLiteral)

Auto Trait Implementations§

§

impl<'a> Freeze for StoredNameFinder<'a>

§

impl<'a> RefUnwindSafe for StoredNameFinder<'a>

§

impl<'a> Send for StoredNameFinder<'a>

§

impl<'a> Sync for StoredNameFinder<'a>

§

impl<'a> Unpin for StoredNameFinder<'a>

§

impl<'a> UnsafeUnpin for StoredNameFinder<'a>

§

impl<'a> UnwindSafe for StoredNameFinder<'a>

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, U> ExactFrom<T> for U
where U: TryFrom<T>,

Source§

fn exact_from(value: T) -> U

Source§

impl<T, U> ExactInto<U> for T
where U: ExactFrom<T>,

Source§

fn exact_into(self) -> U

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> OverflowingInto<U> for T
where U: OverflowingFrom<T>,

Source§

impl<T, U> RoundingInto<U> for T
where U: RoundingFrom<T>,

Source§

impl<T, U> SaturatingInto<U> for T
where U: SaturatingFrom<T>,

Source§

impl<T> ToDebugString for T
where T: Debug,

Source§

fn to_debug_string(&self) -> String

Returns the String produced by Ts Debug implementation.

§Examples
use malachite_base::strings::ToDebugString;

assert_eq!([1, 2, 3].to_debug_string(), "[1, 2, 3]");
assert_eq!(
    [vec![2, 3], vec![], vec![4]].to_debug_string(),
    "[[2, 3], [], [4]]"
);
assert_eq!(Some(5).to_debug_string(), "Some(5)");
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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, U> WrappingInto<U> for T
where U: WrappingFrom<T>,

Source§

fn wrapping_into(self) -> U

Source§

impl<T> PyThreadingConstraint for T