Struct mobi::Mobi

source ·
pub struct Mobi {
    pub content: Vec<u8>,
    pub metadata: MobiMetadata,
}
Expand description

Structure that holds parsed ebook information and contents

Fields§

§content: Vec<u8>§metadata: MobiMetadata

Implementations§

Construct a Mobi object from a slice of bytes

Construct a Mobi object from passed file path

Construct a Mobi object from an object that implements a Read trait

Returns an author of this book

Returns this books publisher

Returns description record if such exists

Returns isbn record if such exists

Returns publish_date record if such exists

Returns contributor record if such exists

Returns title record if such exists

Returns text encoding used in ebook

Returns type of this ebook

Returns language of the ebook

Returns creation datetime This field is only available using time feature

Returns modification datetime This field is only available using time feature

Returns compression method used on this file

Returns encryption method used on this file

Returns the readable reacord range - from first content record to first non book index.

Returns raw records that contain compressed, encrypted and encoded content slices.

Returns all records classified as image records.

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

Returns all readable records content decompressed as a String. This function is a strict version returning error on first encountered decoding error.

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.