Struct NodeList

#[non_exhaustive]
pub struct NodeList { pub list_type: ListType, pub marker_offset: usize, pub padding: usize, pub start: usize, pub delimiter: ListDelimType, pub bullet_char: u8, pub tight: bool, pub is_task_list: bool }

The metadata of a list; the kind of list, the delimiter used and so on.

Fields

list_type: ListType

The kind of list (bullet (unordered) or ordered).

marker_offset: usize

Number of spaces before the list marker.

padding: usize

Number of characters between the start of the list marker and the item text (including the list marker(s)).

start: usize

For ordered lists, the ordinal the list starts at.

delimiter: ListDelimType

For ordered lists, the delimiter after each number.

bullet_char: u8

For bullet lists, the character used for each bullet.

tight: bool

Whether the list is tight, i.e. whether the paragraphs are wrapped in <p> tags when formatted as HTML.

is_task_list: bool

Whether the list contains tasks (checkbox items)

Implementations

impl NodeList

fn bullet(bullet_char: u8, tight: bool) -> Self

Create a new bullet NodeList with the given bullet character and tightness.

fn ordered(start: usize, delimiter: ListDelimType, tight: bool) -> Self

Create a new ordered NodeList with the given starting number, delimiter type, and tightness.

Trait Implementations

impl Clone for NodeList

fn clone(&self) -> Self

impl Debug for NodeList

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Default for NodeList

fn default() -> Self

impl Eq for NodeList

impl PartialEq for NodeList

fn eq(&self, other: &Self) -> bool

impl StructuralPartialEq for NodeList

Auto Trait Implementations

impl Freeze for NodeList

impl RefUnwindSafe for NodeList

impl Send for NodeList

impl Sync for NodeList

impl Unpin for NodeList

impl UnsafeUnpin for NodeList

impl UnwindSafe for NodeList

Blanket Implementations

impl<F, T, S> SimdInto<T, S> for NodeList where T: SimdFrom<F, S>, S: Simd,

impl<T> Any for NodeList where T: 'static + ?Sized,

impl<T> Borrow<T> for NodeList where T: ?Sized,

impl<T> BorrowMut<T> for NodeList where T: ?Sized,

impl<T> CloneToUninit for NodeList where T: Clone,

impl<T> From<T> for NodeList

impl<T> ToOwned for NodeList where T: Clone,

impl<T, S> SimdFrom<T, S> for NodeList where S: Simd,

impl<T, U> Into<U> for NodeList where U: From<T>,

impl<T, U> TryFrom<U> for NodeList where U: Into<T>,

impl<T, U> TryInto<U> for NodeList where U: TryFrom<T>,