Trait palmrs_database::info::ExtraInfoRecord
source · 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§
Required Methods§
sourcefn from_bytes(
hdr: &DatabaseHeader,
data: &mut Cursor<&[u8]>
) -> Result<Self, Error>
fn from_bytes( hdr: &DatabaseHeader, data: &mut Cursor<&[u8]> ) -> Result<Self, Error>
Read the record header from the given byte array
sourcefn data_empty(&self) -> bool
fn data_empty(&self) -> bool
Whether this ExtraInfoRecord contains no data
Provided Methods§
sourcefn data_item_categories(&self) -> Option<Vec<ExtraInfoCategory>>
fn data_item_categories(&self) -> Option<Vec<ExtraInfoCategory>>
If the record contains a list of item categories, return those categories