[−][src]Struct latex::List
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(&self) -> 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
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,