pub enum AssignmentStrategy {
LeftRight,
Declarators,
PatternBased,
ShortVar,
VarSpec,
}Expand description
Strategy for extracting variable name and type from an assignment node.
Variants§
LeftRight
Python/TS: x = Foo() - left/right fields on assignment node
Declarators
TS: const x = new Foo() - variable_declarator children
PatternBased
Rust: let x: Type = value - pattern + type + value fields
ShortVar
Go: x := Foo{} - expression_list left/right
VarSpec
Go: var x Type = ... - var_spec children
Auto Trait Implementations§
impl Freeze for AssignmentStrategy
impl RefUnwindSafe for AssignmentStrategy
impl Send for AssignmentStrategy
impl Sync for AssignmentStrategy
impl Unpin for AssignmentStrategy
impl UnsafeUnpin for AssignmentStrategy
impl UnwindSafe for AssignmentStrategy
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> 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