pub struct LineInfo<'a> {
pub text: &'a str,
pub blank: bool,
pub tbl_arm: bool,
}Expand description
The #LB token’s payload: one physical line, pre-classified. A
downstream dialect’s alt conditions can read it back from the token
with LineInfo::from_token (see the extension recipe in
doc/guide.md).
On the token, the text is the token’s val and the two flags sit
under use_data["md"], so a line costs one string, not two.
Fields§
§text: &'a strThe line’s text, terminator excluded, NULs already replaced.
blank: boolTrue when the line holds nothing but spaces and tabs.
tbl_arm: boolGFM table arming: true when the line contains a | or a -
anywhere. A deliberate, provable superset of “could be a
delimiter row”: every delimiter cell requires at least one -
(:-: rows open pipe-less single-column tables), and multi-column
rows carry |. The real decision needs the container-adjusted
offset only the block algorithm knows (a delimiter row nested in a
block quote matches after the > marker), so the gfm-tagged alt
reading this bit only arms the probe, and try_open_table
re-verifies (see test/spec/mixed.tsv).
Implementations§
Trait Implementations§
impl<'a> Copy for LineInfo<'a>
impl<'a> Eq for LineInfo<'a>
impl<'a> StructuralPartialEq for LineInfo<'a>
Auto Trait Implementations§
impl<'a> Freeze for LineInfo<'a>
impl<'a> RefUnwindSafe for LineInfo<'a>
impl<'a> Send for LineInfo<'a>
impl<'a> Sync for LineInfo<'a>
impl<'a> Unpin for LineInfo<'a>
impl<'a> UnsafeUnpin for LineInfo<'a>
impl<'a> UnwindSafe for LineInfo<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.