[][src]Struct epub_bundler::EpubSource

pub struct EpubSource { /* fields omitted */ }

The source from which an epub is built

Implementations

impl EpubSource[src]

pub fn new() -> Self[src]

pub fn set_title<S: ToString>(
    &mut self,
    title: S
) -> Result<&mut Self, &'static str>
[src]

Set the main title

pub fn set_subtitle<S: ToString>(
    &mut self,
    subtitle: S
) -> Result<&mut Self, &'static str>
[src]

Set a subtitle

pub fn set_onix_title<S: ToString>(
    &mut self,
    title: S,
    kind: OnixTitleCode
) -> Result<&mut Self, &'static str>
[src]

Set an onix title

pub fn set_epub_title<S: ToString>(
    &mut self,
    title: S,
    kind: EpubTitleType
) -> Result<&mut Self, &'static str>
[src]

pub fn set_isbn<S: ToString>(
    &mut self,
    isbn: S
) -> Result<&mut Self, &'static str>
[src]

Set an isbn as the identifier

pub fn set_urn<S: ToString>(
    &mut self,
    urn: S
) -> Result<&mut Self, &'static str>
[src]

set an urn as the identifer

pub fn set_language<S: ToString>(
    &mut self,
    lang: S
) -> Result<&mut Self, &'static str>
[src]

set the language of the epub

pub fn add_author<S: ToString>(
    &mut self,
    contributor: S
) -> Result<&mut Self, &'static str>
[src]

Add an author

pub fn add_editor<S: ToString>(
    &mut self,
    contributor: S
) -> Result<&mut Self, &'static str>
[src]

pub fn add_translator<S: ToString>(
    &mut self,
    contributor: S
) -> Result<&mut Self, &'static str>
[src]

pub fn add_author_of_foreword<S: ToString>(
    &mut self,
    contributor: S
) -> Result<&mut Self, &'static str>
[src]

pub fn add_author_of_introduction<S: ToString>(
    &mut self,
    contributor: S
) -> Result<&mut Self, &'static str>
[src]

pub fn add_author_of_afterword<S: ToString>(
    &mut self,
    contributor: S
) -> Result<&mut Self, &'static str>
[src]

pub fn add_author_of_introduction_and_notes<S: ToString>(
    &mut self,
    contributor: S
) -> Result<&mut Self, &'static str>
[src]

pub fn add_onix_contributor<S: ToString>(
    &mut self,
    name: S,
    role: OnixContributorCode
) -> Result<&mut Self, &'static str>
[src]

add a contributor with an onix code

pub fn add_marc_contributor<S: ToString>(
    &mut self,
    name: S,
    role: MarcRelator
) -> Result<&mut Self, &'static str>
[src]

add a contributor with a marc code

pub fn set_modification_date(
    &mut self,
    d: Tm
) -> Result<&mut Self, &'static str>
[src]

set the modification date

pub fn add_resource(
    &mut self,
    r: EpubResource
) -> Result<&mut Self, &'static str>
[src]

Add a resource

pub fn add_resource_from_file(
    &mut self,
    filename: PathBuf
) -> Result<&mut Self, String>
[src]

Add a resource from a filepath

pub fn add_content(&mut self, r: EpubContent) -> Result<&mut Self, &'static str>[src]

Add a content document

pub fn set_css(&mut self, css: EpubResource) -> Result<&mut Self, &'static str>[src]

Set the base css of the epub

pub fn set_css_from_file(&mut self, path: &Path) -> Result<&mut Self, String>[src]

Set the base css of the epub from a file

pub fn set_cover_image(
    &mut self,
    image: EpubResource
) -> Result<&mut Self, String>
[src]

Set the epub cover image

pub fn set_cover_image_from_file(
    &mut self,
    path: PathBuf
) -> Result<&mut Self, String>
[src]

Set the epub cover image from a file; this should be a jpg file if possible, but an svg file will be converted if required.

pub fn bundle(&mut self) -> Result<Vec<u8>, EpubBundlingError>[src]

Trait Implementations

impl Debug for EpubSource[src]

impl Default for EpubSource[src]

Auto Trait Implementations

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, 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>,