Enum assembly_fdb_core::value::Value  
source · pub enum Value<T: Context> {
    Nothing,
    Integer(i32),
    Float(f32),
    Text(T::String),
    Boolean(bool),
    BigInt(T::I64),
    VarChar(T::XML),
}Expand description
A single field value in the database
This is a generic enum that is the template for all
other Field types in this crate.
Variants§
Nothing
The NULL value
Integer(i32)
A 32 bit integer
Float(f32)
A 32 bit IEEE floating point number
Text(T::String)
A string
Boolean(bool)
A boolean
BigInt(T::I64)
A 64 bit integer
VarChar(T::XML)
A (XML?) string
Implementations§
source§impl<T: Context> Value<T>
 
impl<T: Context> Value<T>
sourcepub fn map<O, M>(&self, mapper: &mut M) -> Value<O>where
    O: Context,
    M: ValueMapperMut<T, O>,
 
pub fn map<O, M>(&self, mapper: &mut M) -> Value<O>where
    O: Context,
    M: ValueMapperMut<T, O>,
Creates a value of a different context using the given mapper
sourcepub fn into_opt_integer(self) -> Option<i32>
 
pub fn into_opt_integer(self) -> Option<i32>
Returns Some with the value if the field contains an Value::Integer.
sourcepub fn into_opt_float(self) -> Option<f32>
 
pub fn into_opt_float(self) -> Option<f32>
Returns Some with the value if the field contains a Value::Float.
sourcepub fn into_opt_text(self) -> Option<T::String>
 
pub fn into_opt_text(self) -> Option<T::String>
Returns Some with the value if the field contains a Value::Text.
sourcepub fn into_opt_boolean(self) -> Option<bool>
 
pub fn into_opt_boolean(self) -> Option<bool>
Returns Some with the value if the field contains a Value::Boolean.
sourcepub fn into_opt_big_int(self) -> Option<T::I64>
 
pub fn into_opt_big_int(self) -> Option<T::I64>
Returns Some with the value if the field contains a Value::BigInt.
sourcepub fn into_opt_varchar(self) -> Option<T::XML>
 
pub fn into_opt_varchar(self) -> Option<T::XML>
Returns Some with the value if the field contains a Value::VarChar.
Trait Implementations§
impl<T: Context> Copy for Value<T>
Auto Trait Implementations§
impl<T> Freeze for Value<T>
impl<T> RefUnwindSafe for Value<T>where
    <T as Context>::String: RefUnwindSafe,
    <T as Context>::I64: RefUnwindSafe,
    <T as Context>::XML: RefUnwindSafe,
impl<T> Send for Value<T>
impl<T> Sync for Value<T>
impl<T> Unpin for Value<T>
impl<T> UnwindSafe for Value<T>where
    <T as Context>::String: UnwindSafe,
    <T as Context>::I64: UnwindSafe,
    <T as Context>::XML: UnwindSafe,
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
 
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
    T: Copy,
 
impl<T> CloneToUninit for Twhere
    T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
 
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)