pub struct ListItem<'a> {
pub marker: Span,
pub padding: u8,
pub checkbox: Option<TaskCheckbox>,
pub spread: bool,
pub children: ArenaVec<'a, Block<'a>>,
pub span: Span,
}Fields§
§marker: SpanThe marker itself: -, or the full 123..
Ordered numbers stay raw
(CommonMark caps them at 999,999,999; arithmetic on them overflows).
padding: u8Spaces between the marker and the content, for aligned-list judgment.
checkbox: Option<TaskCheckbox>GFM task list checkbox, when the item starts with one. The first paragraph begins after the checkbox and the whitespace before same-line content; when only whitespace follows on that line it stays in the paragraph, as the line’s soft or hard break.
spread: boolA blank line separates two of this item’s children (mdast’s listItem.spread).
Looseness is judged per item downstream (Prettier: this, or a blank line before the next item),
while List::tight is the whole list’s cmark verdict.
children: ArenaVec<'a, Block<'a>>§span: SpanTrait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ListItem<'a>
impl<'a> !Send for ListItem<'a>
impl<'a> !UnwindSafe for ListItem<'a>
impl<'a> Freeze for ListItem<'a>
impl<'a> Sync for ListItem<'a>
impl<'a> Unpin for ListItem<'a>
impl<'a> UnsafeUnpin for ListItem<'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
Mutably borrows from an owned value. Read more