pub struct DbsDatabase { /* private fields */ }Implementations§
Source§impl DbsDatabase
impl DbsDatabase
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Load and decode a .dbs file from an in-memory buffer.
pub fn db_type(&self) -> i32
pub fn row_count(&self) -> usize
pub fn column_count(&self) -> usize
pub fn rows(&self) -> &[DbsRowHeader]
pub fn columns(&self) -> &[DbsColumnHeader]
Sourcepub fn get_data_int(
&self,
item_call_no: i32,
column_call_no: i32,
) -> Result<Option<i32>>
pub fn get_data_int( &self, item_call_no: i32, column_call_no: i32, ) -> Result<Option<i32>>
Mimics C_elm_database::get_data(int,int,int*).
Sourcepub fn get_data_str(
&self,
item_call_no: i32,
column_call_no: i32,
) -> Result<Option<String>>
pub fn get_data_str( &self, item_call_no: i32, column_call_no: i32, ) -> Result<Option<String>>
Mimics C_elm_database::get_data(int,int,TSTR&).
Sourcepub fn check_column_no(&self, column_call_no: i32) -> i32
pub fn check_column_no(&self, column_call_no: i32) -> i32
Return the column type: 0 = missing, 1 = numeric (‘V’), 2 = string (‘S’).
Sourcepub fn check_item_no(&self, item_call_no: i32) -> i32
pub fn check_item_no(&self, item_call_no: i32) -> i32
Return 1 if the item call number exists, otherwise 0.
Sourcepub fn find_num(&self, column_call_no: i32, num: i32) -> Result<i32>
pub fn find_num(&self, column_call_no: i32, num: i32) -> Result<i32>
Mimics C_elm_database::find_num.
Trait Implementations§
Source§impl Clone for DbsDatabase
impl Clone for DbsDatabase
Source§fn clone(&self) -> DbsDatabase
fn clone(&self) -> DbsDatabase
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for DbsDatabase
impl RefUnwindSafe for DbsDatabase
impl Send for DbsDatabase
impl Sync for DbsDatabase
impl Unpin for DbsDatabase
impl UnsafeUnpin for DbsDatabase
impl UnwindSafe for DbsDatabase
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