[][src]Struct bookbinder_ast::Metadata

pub struct Metadata<'a> {
    pub title: Cow<'a, str>,
    pub subtitle: Option<Cow<'a, str>>,
    pub authors: Vec<Cow<'a, str>>,
    pub editors: Vec<Cow<'a, str>>,
    pub translators: Vec<Cow<'a, str>>,
    pub foreword_authors: Vec<Cow<'a, str>>,
    pub introduction_authors: Vec<Cow<'a, str>>,
    pub afterword_authors: Vec<Cow<'a, str>>,
    pub introduction_and_notes_authors: Vec<Cow<'a, str>>,
    pub epub_isbn: Option<Cow<'a, str>>,
    // some fields omitted
}

The metadata of a particular book

Fields

title: Cow<'a, str>

The main title of this work

subtitle: Option<Cow<'a, str>>

A subtitle

authors: Vec<Cow<'a, str>>

The authors of this work

editors: Vec<Cow<'a, str>>

The editors of this work

translators: Vec<Cow<'a, str>>

The translators of this work

foreword_authors: Vec<Cow<'a, str>>

Authors of forewords to this work

introduction_authors: Vec<Cow<'a, str>>

Authors of introductions to this work

afterword_authors: Vec<Cow<'a, str>>

Authors of afterword to this work

introduction_and_notes_authors: Vec<Cow<'a, str>>

Authors of introductions to and in-text notes or commentary on this work

epub_isbn: Option<Cow<'a, str>>

The isbn of this work as an epub

Implementations

impl<'a> Metadata<'a>[src]

pub fn get_short_title(&self) -> &str[src]

Get either the short title or the full title as a fallback

pub fn get_authors(&self) -> Option<String>[src]

get a string of all the authors with in the format Name, Name and Name

pub fn uppercased_authors(&self) -> Option<String>[src]

Get a string of all authors, in the format A, B and C, where all names are uppercased

impl<'a> Metadata<'a>[src]

pub fn author<A: ContributorSource<'a>>(&mut self, name: A) -> &mut Self[src]

Add an author or authors

pub fn translator<A: ContributorSource<'a>>(&mut self, name: A) -> &mut Self[src]

Add a translator or translators

pub fn editor<A: ContributorSource<'a>>(&mut self, name: A) -> &mut Self[src]

Add an editor or editors

pub fn cover_designer<S: Into<Cow<'a, str>>>(&mut self, value: S) -> &mut Self[src]

Name the cover designer of this work

pub fn shorttitle<S: Into<Cow<'a, str>>>(&mut self, value: S) -> &mut Self[src]

Set the short title, a briefer version of the title used where a full title might be unneccesarily verbose

pub fn subtitle<S: Into<Cow<'a, str>>>(&mut self, value: S) -> &mut Self[src]

Set the work's subtitle

Name the copyright holder in any author photograph included in the work or on the covers

pub fn paperback_isbn<S: Into<Cow<'a, str>>>(&mut self, value: S) -> &mut Self[src]

An isbn for the paperback edition of this book

pub fn hardback_isbn<S: Into<Cow<'a, str>>>(&mut self, value: S) -> &mut Self[src]

An isbn for the hardback edition of this book

pub fn epub_isbn<S: Into<Cow<'a, str>>>(&mut self, value: S) -> &mut Self[src]

An isbn for the epub edition of this book

pub fn publisher<S: Into<Cow<'a, str>>>(&mut self, value: S) -> &mut Self[src]

The name of the publisher of this book

pub fn publisher_address<S: Into<Cow<'a, str>>>(
    &mut self,
    value: S
) -> &mut Self
[src]

An address for the publisher

pub fn publisher_url<S: Into<Cow<'a, str>>>(&mut self, value: S) -> &mut Self[src]

A url for the publisher

pub fn print_location<S: Into<Cow<'a, str>>>(&mut self, value: S) -> &mut Self[src]

State where the work will be printed

pub fn copyright_statement<S: Into<Cow<'a, str>>>(
    &mut self,
    value: S
) -> &mut Self
[src]

Set a custom copyright statement

pub fn do_not_assert_moral_rights(&mut self) -> &mut Self[src]

Set this flag if you do not wish to assert the moral rights of the author on the copyright page

pub fn is_not_first_publication(&mut self) -> &mut Self[src]

Set this flag if this is not the book's first publication

Trait Implementations

impl<'a> Clone for Metadata<'a>[src]

impl<'a> Debug for Metadata<'a>[src]

impl<'a> Default for Metadata<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Metadata<'a>

impl<'a> Send for Metadata<'a>

impl<'a> Sync for Metadata<'a>

impl<'a> Unpin for Metadata<'a>

impl<'a> UnwindSafe for Metadata<'a>

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> From<T> for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,