Struct somedoc::model::block::List[][src]

pub struct List { /* fields omitted */ }

A list is either a bulleted or unordered set of values, or an enumerated list of values.

A List is a tree structure with ListItem being the inner nodes in the tree and which may contain either another list, or a Item.

Implementations

impl List[src]

pub fn new(kind: ListKind) -> Self[src]

Create a new list of the provided kind.

pub fn ordered() -> Self[src]

Create a new ordered/numbered item list.

pub fn unordered() -> Self[src]

Create a new unordered/bulleted item list.

pub fn has_inner(&self) -> bool[src]

Returns true if this list contains any items or sub-lists.

pub fn inner(&self) -> &Vec<ListItem>[src]

Return the vector of list items or sub-lists.

pub fn add_item(&mut self, item: Item) -> &mut Self[src]

Add a new item to this list.

pub fn add_item_str(&mut self, item: &str) -> &mut Self[src]

Add a new item to this list.

pub fn add_item_from(&mut self, item: InlineContent) -> &mut Self[src]

Add a new item to this list from the provided content.

pub fn add_sub_list(&mut self, item: List) -> &mut Self[src]

pub fn is_ordered(&self) -> bool[src]

Return true if this is an ordered/numbered item list, else false.

pub fn is_unordered(&self) -> bool[src]

Return true if this is an unordered/bulleted item list, else false.

pub fn kind(&self) -> &ListKind[src]

Return the kind of this list.

Trait Implementations

impl Clone for List[src]

impl Debug for List[src]

impl Default for List[src]

impl<'de> Deserialize<'de> for List[src]

impl From<List> for ListItem[src]

impl HasLabel for List[src]

impl Into<BlockContent> for List[src]

impl Serialize for List[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.