pub struct LineIndent {
pub depth: Option<u16>,
pub closer: bool,
}Expand description
One line’s contribution to the block walk.
The two fields travel together because the walk needs both at the same
moment: depth decides whether a block closes here, and closer decides
whether the closing line is swallowed into the block it closes. Passing two
parallel slices instead would let a caller hand over mismatched lengths.
Fields§
§depth: Option<u16>Leading whitespace in display columns, or None when the line is
blank. Blank lines are transparent to the walk — they neither break a
block nor extend one past its last content line.
closer: boolThe line is nothing but closing brackets. See is_closer_line.
Trait Implementations§
Source§impl Clone for LineIndent
impl Clone for LineIndent
Source§fn clone(&self) -> LineIndent
fn clone(&self) -> LineIndent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LineIndent
Source§impl Debug for LineIndent
impl Debug for LineIndent
impl Eq for LineIndent
Source§impl PartialEq for LineIndent
impl PartialEq for LineIndent
impl StructuralPartialEq for LineIndent
Auto Trait Implementations§
impl Freeze for LineIndent
impl RefUnwindSafe for LineIndent
impl Send for LineIndent
impl Sync for LineIndent
impl Unpin for LineIndent
impl UnsafeUnpin for LineIndent
impl UnwindSafe for LineIndent
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.