Enum dbase::FieldValue
source · pub enum FieldValue {
Character(Option<String>),
Numeric(Option<f64>),
Logical(Option<bool>),
Date(Option<Date>),
Float(Option<f32>),
Integer(i32),
Currency(f64),
DateTime(DateTime),
Double(f64),
Memo(String),
}
Expand description
Enum where each variant stores the record value
Variants§
Character(Option<String>)
dBase String type
A string full of ‘pad bytes’ is considered None
Numeric(Option<f64>)
dBase type to represent numbers, stored as String in the file
Logical(Option<bool>)
dBase type for boolean values, stored as a character in the file
Date(Option<Date>)
dBase type for dates, stored as a string in the file
Float(Option<f32>)
Another dBase type to represent numbers, stored as String in the file
Integer(i32)
Currency(f64)
DateTime(DateTime)
Double(f64)
Memo(String)
Memo is a dBase type that allows to store Strings
that are longer than 255 bytes.
These strings are stored in an external file
called the Memo file
Implementations§
source§impl FieldValue
impl FieldValue
sourcepub fn field_type(&self) -> FieldType
pub fn field_type(&self) -> FieldType
Returns the corresponding field type of the contained value
Trait Implementations§
source§impl Clone for FieldValue
impl Clone for FieldValue
source§fn clone(&self) -> FieldValue
fn clone(&self) -> FieldValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FieldValue
impl Debug for FieldValue
source§impl Display for FieldValue
impl Display for FieldValue
source§impl From<Date> for FieldValue
impl From<Date> for FieldValue
source§impl From<DateTime> for FieldValue
impl From<DateTime> for FieldValue
source§impl From<String> for FieldValue
impl From<String> for FieldValue
source§impl From<bool> for FieldValue
impl From<bool> for FieldValue
source§impl From<f32> for FieldValue
impl From<f32> for FieldValue
source§impl From<f64> for FieldValue
impl From<f64> for FieldValue
source§impl PartialEq for FieldValue
impl PartialEq for FieldValue
source§fn eq(&self, other: &FieldValue) -> bool
fn eq(&self, other: &FieldValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<FieldValue> for Date
impl TryFrom<FieldValue> for Date
§type Error = FieldConversionError
type Error = FieldConversionError
The type returned in the event of a conversion error.
source§impl TryFrom<FieldValue> for DateTime
impl TryFrom<FieldValue> for DateTime
§type Error = FieldConversionError
type Error = FieldConversionError
The type returned in the event of a conversion error.
source§impl TryFrom<FieldValue> for Option<Date>
impl TryFrom<FieldValue> for Option<Date>
§type Error = FieldConversionError
type Error = FieldConversionError
The type returned in the event of a conversion error.
source§impl TryFrom<FieldValue> for Option<String>
impl TryFrom<FieldValue> for Option<String>
§type Error = FieldConversionError
type Error = FieldConversionError
The type returned in the event of a conversion error.
source§impl TryFrom<FieldValue> for Option<bool>
impl TryFrom<FieldValue> for Option<bool>
§type Error = FieldConversionError
type Error = FieldConversionError
The type returned in the event of a conversion error.
source§impl TryFrom<FieldValue> for Option<f32>
impl TryFrom<FieldValue> for Option<f32>
§type Error = FieldConversionError
type Error = FieldConversionError
The type returned in the event of a conversion error.
source§impl TryFrom<FieldValue> for Option<f64>
impl TryFrom<FieldValue> for Option<f64>
§type Error = FieldConversionError
type Error = FieldConversionError
The type returned in the event of a conversion error.
source§impl TryFrom<FieldValue> for String
impl TryFrom<FieldValue> for String
§type Error = FieldConversionError
type Error = FieldConversionError
The type returned in the event of a conversion error.
source§impl TryFrom<FieldValue> for bool
impl TryFrom<FieldValue> for bool
§type Error = FieldConversionError
type Error = FieldConversionError
The type returned in the event of a conversion error.
source§impl TryFrom<FieldValue> for f32
impl TryFrom<FieldValue> for f32
§type Error = FieldConversionError
type Error = FieldConversionError
The type returned in the event of a conversion error.
source§impl TryFrom<FieldValue> for f64
impl TryFrom<FieldValue> for f64
§type Error = FieldConversionError
type Error = FieldConversionError
The type returned in the event of a conversion error.
source§impl TryFrom<FieldValue> for i32
impl TryFrom<FieldValue> for i32
§type Error = FieldConversionError
type Error = FieldConversionError
The type returned in the event of a conversion error.
impl StructuralPartialEq for FieldValue
Auto Trait Implementations§
impl RefUnwindSafe for FieldValue
impl Send for FieldValue
impl Sync for FieldValue
impl Unpin for FieldValue
impl UnwindSafe for FieldValue
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