pub struct DbfTable {
pub fields: Vec<DbfFieldDescriptor>,
pub records: Vec<DbfRecord>,
}Expand description
A simplified in-memory DBF attribute table.
Fields§
§fields: Vec<DbfFieldDescriptor>Field descriptors (schema).
records: Vec<DbfRecord>Data rows.
Implementations§
Source§impl DbfTable
impl DbfTable
Sourcepub fn new(fields: Vec<DbfFieldDescriptor>) -> Self
pub fn new(fields: Vec<DbfFieldDescriptor>) -> Self
Create a new table with the given schema.
Sourcepub fn append(&mut self, record: DbfRecord) -> GeoResult<()>
pub fn append(&mut self, record: DbfRecord) -> GeoResult<()>
Append a record; returns GeoError if value count mismatches.
Sourcepub fn record_count(&self) -> usize
pub fn record_count(&self) -> usize
Number of records.
Sourcepub fn field_index(&self, name: &str) -> Option<usize>
pub fn field_index(&self, name: &str) -> Option<usize>
Look up the column index for a field name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DbfTable
impl RefUnwindSafe for DbfTable
impl Send for DbfTable
impl Sync for DbfTable
impl Unpin for DbfTable
impl UnsafeUnpin for DbfTable
impl UnwindSafe for DbfTable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.