[−][src]Struct mobi::Mobi
Structure that holds parsed ebook information and contents
Fields
raw_content: Vec<u8>
header: Header
palmdoc: PalmDocHeader
mobi: MobiHeader
exth: ExtHeader
records: Vec<Record>
Implementations
impl Mobi
[src]
pub fn new<B: AsRef<Vec<u8>>>(bytes: B) -> Result<Mobi>
[src]
Construct a Mobi object from a slice
pub fn from_path<P: AsRef<Path>>(file_path: P) -> Result<Mobi>
[src]
Construct a Mobi object from passed file path
pub fn from_read<R: Read>(reader: R) -> Result<Mobi>
[src]
Construct a Mobi object from an object that implements a Read trait
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 text_encoding(&self) -> TextEncoding
[src]
Returns text encoding used in ebook
pub fn mobi_type(&self) -> Option<String>
[src]
Returns type of this ebook
pub fn language(&self) -> Option<String>
[src]
Returns language of the ebook
pub fn created_datetime(&self) -> NaiveDateTime
[src]
Returns creation datetime
This field is only available using time
feature
pub fn mod_datetime(&self) -> NaiveDateTime
[src]
Returns modification datetime
This field is only available using time
feature
pub fn compression(&self) -> Option<String>
[src]
Returns compression method used on this file
pub fn encryption(&self) -> Option<String>
[src]
Returns encryption method used on this file
pub fn content_as_string(&self) -> String
[src]
Returns all readable records content decompressed as a String. There are only two supported encodings in mobi format (UTF8, WIN1252) and both are losely converted by this function
pub fn content(&self) -> Vec<u8>
[src]
Returns all readable records content decompressed as a Vec
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Mobi
impl Send for Mobi
impl Sync for Mobi
impl Unpin for Mobi
impl UnwindSafe for Mobi
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,