pub struct TableMapper { /* private fields */ }
Expand description
Default implementation of the FieldMapper trait
Provides bidirectional mapping between field IDs and names using HashMaps for efficient lookups.
Implementations§
Source§impl TableMapper
impl TableMapper
Sourcepub fn deserialize_row<T>(
&self,
row: HashMap<String, Value>,
) -> Result<T, Error>where
T: DeserializeOwned,
pub fn deserialize_row<T>(
&self,
row: HashMap<String, Value>,
) -> Result<T, Error>where
T: DeserializeOwned,
Trait Implementations§
Source§impl Clone for TableMapper
impl Clone for TableMapper
Source§fn clone(&self) -> TableMapper
fn clone(&self) -> TableMapper
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 Default for TableMapper
impl Default for TableMapper
Source§fn default() -> TableMapper
fn default() -> TableMapper
Returns the “default value” for a type. Read more
Source§impl FieldMapper for TableMapper
impl FieldMapper for TableMapper
Source§fn map_fields(&mut self, fields: Vec<TableField>)
fn map_fields(&mut self, fields: Vec<TableField>)
Maps a collection of table fields, building the internal mapping structures Read more
Source§fn get_field_id(&self, name: &str) -> Option<u64>
fn get_field_id(&self, name: &str) -> Option<u64>
Gets the field ID corresponding to a field name Read more
Source§fn get_field_name(&self, id: u64) -> Option<String>
fn get_field_name(&self, id: u64) -> Option<String>
Gets the field name corresponding to a field ID Read more
Source§fn get_fields(&self) -> Vec<TableField>
fn get_fields(&self) -> Vec<TableField>
Gets all mapped fields Read more
Auto Trait Implementations§
impl Freeze for TableMapper
impl RefUnwindSafe for TableMapper
impl Send for TableMapper
impl Sync for TableMapper
impl Unpin for TableMapper
impl UnwindSafe for TableMapper
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