pub struct FormattedLine {
pub tokens: Vec<JsonToken>,
pub path: Option<JsonPath>,
pub foldable: bool,
pub folded: bool,
pub depth: usize,
}Expand description
A rendered line produced by JsonView::lines_with_state: its tokens plus
the fold metadata needed to draw and navigate the tree.
Fields§
§tokens: Vec<JsonToken>The tokens to draw (already the fold placeholder for a folded node).
path: Option<JsonPath>The path of the foldable node this line opens, or None for a leaf or
closing line.
foldable: boolWhether this line opens a foldable object/array node.
folded: boolWhether this line is currently rendered folded (a placeholder).
depth: usizeNesting depth (0 at the root).
Trait Implementations§
Source§impl Clone for FormattedLine
impl Clone for FormattedLine
Auto Trait Implementations§
impl Freeze for FormattedLine
impl RefUnwindSafe for FormattedLine
impl Send for FormattedLine
impl Sync for FormattedLine
impl Unpin for FormattedLine
impl UnsafeUnpin for FormattedLine
impl UnwindSafe for FormattedLine
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