[−][src]Struct latex::Preamble
A node representing the document's preamble.
Fields
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]
E: Into<PreambleElement>,
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(&self) -> 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]
fn extend<T: IntoIterator<Item = PreambleElement>>(&mut self, iter: T)
[src]
impl PartialEq<Preamble> for Preamble
[src]
impl Debug for Preamble
[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,