[][src]Struct markdown_composer::types::list::List

pub struct List {
    pub items: Vec<ListItem>,
    pub marker: ListItemMarker,
    pub ty: ListType,
}

A markdown list.

Note

The implementation does NOT check if the marker matches the specified list type. It is theoretically possible to create an ordered list that uses dashes as its item markers. The here exposed inner fields should therefore be used with care.

Please use the builders to safely create Markdown compliant documents!

Fields

items: Vec<ListItem>marker: ListItemMarkerty: ListType

Implementations

impl List[src]

impl List[src]

pub fn new() -> Self[src]

Creates a new default List.

The list will be unordered and uses a dash marker.

pub fn ordered() -> Self[src]

Creates a new empty ordered List.

pub fn unordered() -> Self[src]

Creates a new empty unordered List.

pub fn ordered_with(items: Vec<ListItem>) -> Self[src]

Creates a new ordered List with the given items.

pub fn unordered_with(items: Vec<ListItem>) -> Self[src]

Creates a new unordered List with the given items.

Trait Implementations

impl Clone for List[src]

impl Debug for List[src]

impl Default for List[src]

impl Display for List[src]

Auto Trait Implementations

impl !RefUnwindSafe for List

impl !Send for List

impl !Sync for List

impl Unpin for List

impl !UnwindSafe for List

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MarkdownElement for T where
    T: Clone + Debug + Display
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.