pub struct WalkOptions {
pub visit_tokens: bool,
pub visit_trivia: bool,
}Expand description
Options that control how the tree is traversed.
Fields§
§visit_tokens: boolVisit leaf tokens (identifiers, literals, operators, etc.). If false, only syntax nodes are visited.
visit_trivia: boolWhen visiting tokens, include trivia (whitespace, comments).
Ignored if visit_tokens is false.
Implementations§
Source§impl WalkOptions
impl WalkOptions
Sourcepub const fn nodes_only() -> WalkOptions
pub const fn nodes_only() -> WalkOptions
Only visit syntax nodes (no tokens). Useful for structure-only analysis.
Sourcepub fn semantic_only() -> WalkOptions
pub fn semantic_only() -> WalkOptions
Visit nodes and semantic tokens only (no trivia).
Sourcepub const fn full() -> WalkOptions
pub const fn full() -> WalkOptions
Visit nodes and all tokens including trivia. Useful for formatting.
Trait Implementations§
Source§impl Clone for WalkOptions
impl Clone for WalkOptions
Source§fn clone(&self) -> WalkOptions
fn clone(&self) -> WalkOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WalkOptions
impl Debug for WalkOptions
Source§impl Default for WalkOptions
impl Default for WalkOptions
Source§fn default() -> WalkOptions
fn default() -> WalkOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WalkOptions
impl RefUnwindSafe for WalkOptions
impl Send for WalkOptions
impl Sync for WalkOptions
impl Unpin for WalkOptions
impl UnsafeUnpin for WalkOptions
impl UnwindSafe for WalkOptions
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