[][src]Struct latex::List

pub struct List {
    pub kind: ListKind,
    // some fields omitted
}

A list (either dot points or numbered).

Examples

A list can be used like so:

use latex::{List, ListKind};

let mut list = List::new(ListKind::Itemize);
list.push("Hello").push("From").push("Some").push("Dot-points");

Calling the render() method on the list will then give something like this:

\begin{itemize}
\item Hello
\item From
\item Some
\item Dot-points
\end{itemize}

Fields

kind: ListKind

The kind of list this is.

Methods

impl List[src]

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

Create an empty list of the specified type.

pub fn push<S: AsRef<str>>(&mut self, item: S) -> &mut Self[src]

Add an element to the list.

pub fn iter(&self) -> Iter<Item>[src]

Iterate over the items in the list.

Trait Implementations

impl Clone for List[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl From<List> for Element[src]

impl PartialEq<List> for List[src]

impl Debug for List[src]

Auto Trait Implementations

impl Send for List

impl Sync for List

Blanket Implementations

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.

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

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

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