[][src]Struct latex::Preamble

pub struct Preamble {
    pub author: Option<String>,
    pub title: Option<String>,
    // some fields omitted
}

A node representing the document's preamble.

Fields

author: Option<String>

The document's author.

title: Option<String>

An optional title for the document.

Methods

impl Preamble[src]

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

Set the document's author.

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

Set the document title.

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

Add a package import to the preamble.

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

Iterate over each package used in the Preamble.

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

Is the preamble empty?

pub fn push<E>(&mut self, element: E) -> &mut Self where
    E: Into<PreambleElement>, 
[src]

Add a PreambleElement to the Preamble.

To make this work as seamlessly as possible, it will accept anything which can be converted into an PreambleElement using into() and supports the builder pattern with method chaining.

Trait Implementations

impl Default for Preamble[src]

impl Clone for Preamble[src]

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

Performs copy-assignment from source. Read more

impl Extend<PreambleElement> for Preamble[src]

impl PartialEq<Preamble> for Preamble[src]

impl Debug for Preamble[src]

Auto Trait Implementations

impl Send for Preamble

impl Sync for Preamble

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]