pub struct TreeDisplayOptions {
pub show_tokens: bool,
pub show_trivia: bool,
pub max_token_text_len: usize,
pub indent: String,
}Expand description
Options for formatting the syntax tree (re-exported from sipha). Options for formatting the syntax tree.
Fields§
§show_tokens: boolInclude leaf tokens in the tree (otherwise only nodes are shown).
show_trivia: boolWhen showing tokens, include trivia (whitespace, comments).
max_token_text_len: usizeMaximum length of token text to display; longer text is truncated with “…”.
indent: StringIndent string for each level (e.g. “ “ or “│ “).
Implementations§
Source§impl TreeDisplayOptions
impl TreeDisplayOptions
Sourcepub fn structure_only() -> TreeDisplayOptions
pub fn structure_only() -> TreeDisplayOptions
Structure-only: only syntax nodes, no tokens.
Sourcepub fn full() -> TreeDisplayOptions
pub fn full() -> TreeDisplayOptions
Full tree: nodes and all tokens including trivia.
Trait Implementations§
Source§impl Clone for TreeDisplayOptions
impl Clone for TreeDisplayOptions
Source§fn clone(&self) -> TreeDisplayOptions
fn clone(&self) -> TreeDisplayOptions
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 TreeDisplayOptions
impl Debug for TreeDisplayOptions
Source§impl Default for TreeDisplayOptions
impl Default for TreeDisplayOptions
Source§fn default() -> TreeDisplayOptions
fn default() -> TreeDisplayOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TreeDisplayOptions
impl RefUnwindSafe for TreeDisplayOptions
impl Send for TreeDisplayOptions
impl Sync for TreeDisplayOptions
impl Unpin for TreeDisplayOptions
impl UnsafeUnpin for TreeDisplayOptions
impl UnwindSafe for TreeDisplayOptions
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