Struct mobi::headers::MobiMetadata

source ·
pub struct MobiMetadata {
    pub name: Vec<u8>,
    pub header: Header,
    pub records: PdbRecords,
    pub palmdoc: PalmDocHeader,
    pub mobi: MobiHeader,
    pub exth: ExtHeader,
}
Expand description

Holds all headers containing low level metadata of a mobi book

Fields§

§name: Vec<u8>§header: Header§records: PdbRecords§palmdoc: PalmDocHeader§mobi: MobiHeader§exth: ExtHeader

Implementations§

Construct a Metadata object from a slice of bytes

Construct a Metadata object from passed file path

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

Returns raw ExthRecord data located at appropriate position if it exists. It is highly recommended to use public api provided here to access those records but in case where lower level access is needed this method provides access to all fields.

Some records can occur multiple times thats why a list of data buffers is returned.

Returns raw ExthRecord data located at passed position if it exists.

If unsure where the wanted record is located at use exth_record method that limits possible position to those commonly available on mobi books.

It is highly recommended to instead use public api provided here to access those records but in case where lower level access is needed this method provides access to all fields.

Some records can occur multiple times thats why a list of data buffers is returned.

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 read from EXTH header if it exists or defaults to full book name read from location specified in MOBI header.

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 a list of subject records as a string if such records exist

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.