pub struct QueryTreeView { /* private fields */ }Expand description
Query tree view for visualizing query structure.
Displays SQL query structure as an ASCII/Unicode tree.
Implementations§
Source§impl QueryTreeView
impl QueryTreeView
Sourcepub fn add_node(
self,
label: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn add_node( self, label: impl Into<String>, value: impl Into<String>, ) -> Self
Add a simple node with label and optional value.
Sourcepub fn add_child(
self,
label: impl Into<String>,
items: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn add_child( self, label: impl Into<String>, items: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Add a node with children (for lists like columns).
Sourcepub fn add_tree_node(self, node: TreeNode) -> Self
pub fn add_tree_node(self, node: TreeNode) -> Self
Add a pre-built tree node.
Sourcepub fn render_plain(&self) -> String
pub fn render_plain(&self) -> String
Render the tree as plain text.
Sourcepub fn render_styled(&self) -> String
pub fn render_styled(&self) -> String
Render the tree as styled text with ANSI colors.
Trait Implementations§
Source§impl Clone for QueryTreeView
impl Clone for QueryTreeView
Source§fn clone(&self) -> QueryTreeView
fn clone(&self) -> QueryTreeView
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 QueryTreeView
impl Debug for QueryTreeView
Auto Trait Implementations§
impl Freeze for QueryTreeView
impl RefUnwindSafe for QueryTreeView
impl Send for QueryTreeView
impl Sync for QueryTreeView
impl Unpin for QueryTreeView
impl UnwindSafe for QueryTreeView
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