pub enum Affinity {
Integer,
Text,
Blob,
Real,
Numeric,
}Variants§
Implementations§
Source§impl Affinity
impl Affinity
Sourcepub fn of(declared_type: Option<&str>) -> Affinity
pub fn of(declared_type: Option<&str>) -> Affinity
Apply the five rules to a declared type. A column declared without a type has blob affinity, which is the one that converts nothing.
pub fn as_str(self) -> &'static str
Sourcepub fn logical_class(self, value: &SqliteValue) -> StorageClass
pub fn logical_class(self, value: &SqliteValue) -> StorageClass
What a stored value means once this column’s affinity is applied.
The only case where this differs from the physical class is an integer in a real affinity column, which is a float that SQLite wrote out compactly, and which SQLite itself reports as a real.
Trait Implementations§
impl Copy for Affinity
impl Eq for Affinity
impl StructuralPartialEq for Affinity
Auto Trait Implementations§
impl Freeze for Affinity
impl RefUnwindSafe for Affinity
impl Send for Affinity
impl Sync for Affinity
impl Unpin for Affinity
impl UnsafeUnpin for Affinity
impl UnwindSafe for Affinity
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