#[non_exhaustive]pub enum StorageStrictness {
Lenient,
Strict,
}Expand description
How Value conversion treats a stored value that its declared type does
not strictly permit but that can still be read as that type.
These cases come from SQLite’s storage model rather than from the GeoPackage
types. SQLite stores what it is given under a column’s type affinity, and
BOOLEAN has no affinity at all, so a BOOLEAN column can contain any
integer whatever the spec says about it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Lenient
Read the value as its declared type where that is possible: any non-zero
INTEGER in a BOOLEAN column is true, and an INTEGER in a
FLOAT/DOUBLE column widens losslessly to Value::Float.
The default. Non-conformant values of this kind occur in files that other implementations read without complaint, so rejecting them by default would make this crate the odd one out on files it can perfectly well read.
Strict
Reject both: a BOOLEAN column may contain only 0 or 1
(Error::NonBooleanInteger), and a FLOAT/DOUBLE column may
contain only REAL (Error::ValueTypeMismatch).
Trait Implementations§
Source§impl Clone for StorageStrictness
impl Clone for StorageStrictness
Source§fn clone(&self) -> StorageStrictness
fn clone(&self) -> StorageStrictness
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more