pub trait ExtraInfoRecord: Sized + Debug {
    const SIZE: usize;

    // Required methods
    fn from_bytes(
        hdr: &DatabaseHeader,
        data: &mut Cursor<&[u8]>
    ) -> Result<Self, Error>;
    fn to_bytes(&self) -> Result<Vec<u8>, Error>;
    fn data_empty(&self) -> bool;

    // Provided method
    fn data_item_categories(&self) -> Option<Vec<ExtraInfoCategory>> { ... }
}
Expand description

Helper trait for decoding & encoding “extra data” records (app info / sort info)

Required Associated Constants§

source

const SIZE: usize

Size in bytes (packed) which the ExtraInfoRecord occupies in the pdb/prc

Required Methods§

source

fn from_bytes( hdr: &DatabaseHeader, data: &mut Cursor<&[u8]> ) -> Result<Self, Error>

Read the record header from the given byte array

source

fn to_bytes(&self) -> Result<Vec<u8>, Error>

Write the record header to a new Vec<u8>

source

fn data_empty(&self) -> bool

Whether this ExtraInfoRecord contains no data

Provided Methods§

source

fn data_item_categories(&self) -> Option<Vec<ExtraInfoCategory>>

If the record contains a list of item categories, return those categories

Implementors§