[][src]Struct mobi::Mobi

pub struct Mobi {
    pub contents: Vec<u8>,
    pub header: Header,
    pub records: Vec<Record>,
    pub palmdoc: PalmDocHeader,
    pub mobi: MobiHeader,
    pub exth: ExtHeader,
}

Structure that holds parsed ebook information and contents

Fields

contents: Vec<u8>header: Headerrecords: Vec<Record>palmdoc: PalmDocHeadermobi: MobiHeaderexth: ExtHeader

Methods

impl Mobi[src]

pub fn init<P: AsRef<Path>>(file_path: P) -> Result<Mobi, Error>[src]

Construct a Mobi object from passed file path Returns std::io::Error if there is a problem with the provided path

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

Returns author record if such exists

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

Returns publisher record if such exists

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

Returns description record if such exists

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

Returns isbn record if such exists

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

Returns publish_date record if such exists

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

Returns contributor record if such exists

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

Returns title record if such exists

pub fn print_book_info(&self)[src]

Prints basic information about the book into stdout

Trait Implementations

impl Debug for Mobi[src]

Auto Trait Implementations

impl Send for Mobi

impl Unpin for Mobi

impl Sync for Mobi

impl UnwindSafe for Mobi

impl RefUnwindSafe for Mobi

Blanket Implementations

impl<T> From<T> for T[src]

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

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> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]