Struct palmrs_database::PalmDatabase
source · pub struct PalmDatabase<T: DatabaseFormat> {
pub header: DatabaseHeader,
pub app_info: T::AppInfoRecord,
/* private fields */
}
Expand description
A representation of a Palm OS database file
This uses the DatabaseFormat
trait to allow making access to database records, as well as
validity checks on the database content, generic across the PRC and PDB implementations.
Fields§
§header: DatabaseHeader
§app_info: T::AppInfoRecord
Implementations§
source§impl<T: DatabaseFormat> PalmDatabase<T>
impl<T: DatabaseFormat> PalmDatabase<T>
pub fn from_bytes<'a>(data: &'a [u8]) -> Result<Self, Error>
pub fn to_bytes(&self) -> Result<Vec<u8>>
pub fn list_records_resources(&self) -> &[(T::RecordHeader, Vec<u8>)]
sourcepub fn insert_record(
&mut self,
attributes: RecordAttributes,
data: &[u8]
) -> u32
pub fn insert_record( &mut self, attributes: RecordAttributes, data: &[u8] ) -> u32
Create a new record in the database, returning the ID of the new record
Trait Implementations§
source§impl<T: Clone + DatabaseFormat> Clone for PalmDatabase<T>where
T::AppInfoRecord: Clone,
T::RecordHeader: Clone,
impl<T: Clone + DatabaseFormat> Clone for PalmDatabase<T>where T::AppInfoRecord: Clone, T::RecordHeader: Clone,
source§fn clone(&self) -> PalmDatabase<T>
fn clone(&self) -> PalmDatabase<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: DatabaseFormat> Debug for PalmDatabase<T>
impl<T: DatabaseFormat> Debug for PalmDatabase<T>
source§impl<T: DatabaseFormat> Display for PalmDatabase<T>
impl<T: DatabaseFormat> Display for PalmDatabase<T>
source§impl<T: PartialEq + DatabaseFormat> PartialEq<PalmDatabase<T>> for PalmDatabase<T>where
T::AppInfoRecord: PartialEq,
T::RecordHeader: PartialEq,
impl<T: PartialEq + DatabaseFormat> PartialEq<PalmDatabase<T>> for PalmDatabase<T>where T::AppInfoRecord: PartialEq, T::RecordHeader: PartialEq,
source§fn eq(&self, other: &PalmDatabase<T>) -> bool
fn eq(&self, other: &PalmDatabase<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<T: DatabaseFormat> StructuralPartialEq for PalmDatabase<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for PalmDatabase<T>where T: RefUnwindSafe, <T as DatabaseFormat>::AppInfoRecord: RefUnwindSafe, <T as DatabaseFormat>::RecordHeader: RefUnwindSafe,
impl<T> Send for PalmDatabase<T>where T: Send, <T as DatabaseFormat>::AppInfoRecord: Send, <T as DatabaseFormat>::RecordHeader: Send,
impl<T> Sync for PalmDatabase<T>where T: Sync, <T as DatabaseFormat>::AppInfoRecord: Sync, <T as DatabaseFormat>::RecordHeader: Sync,
impl<T> Unpin for PalmDatabase<T>where T: Unpin, <T as DatabaseFormat>::AppInfoRecord: Unpin, <T as DatabaseFormat>::RecordHeader: Unpin,
impl<T> UnwindSafe for PalmDatabase<T>where T: UnwindSafe, <T as DatabaseFormat>::AppInfoRecord: UnwindSafe, <T as DatabaseFormat>::RecordHeader: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more