pub struct Schema {
pub fields: Vec<FieldDef>,
pub geometry: Option<GeomField>,
pub crs: Crs,
/* private fields */
}Fields§
§fields: Vec<FieldDef>§geometry: Option<GeomField>§crs: CrsImplementations§
Source§impl Schema
impl Schema
pub fn new(fields: Vec<FieldDef>, geometry: Option<GeomField>, crs: Crs) -> Self
pub fn field(&self, idx: usize) -> Option<&FieldDef>
pub fn field_index(&self, name: &str) -> Option<usize>
pub fn field_by_name(&self, name: &str) -> Option<&FieldDef>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn validate_row(&self, values: &[Value]) -> Result<()>
pub fn validate_row(&self, values: &[Value]) -> Result<()>
Validate that an attribute row has the right arity and each value’s type tag matches the schema (nulls pass for nullable fields).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnsafeUnpin for Schema
impl UnwindSafe for Schema
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