#[non_exhaustive]pub enum FieldValue {
Show 28 variants
Calc(String),
Category(Vec<String>),
CheckBox(Vec<String>),
CreatedTime(DateTime<FixedOffset>),
Creator(User),
Date(Option<NaiveDate>),
DateTime(Option<DateTime<FixedOffset>>),
DropDown(Option<String>),
File(Vec<FileBody>),
GroupSelect(Vec<Group>),
Link(String),
Modifier(User),
MultiLineText(String),
MultiSelect(Vec<String>),
Number(Option<BigDecimal>),
OrganizationSelect(Vec<Organization>),
RadioButton(Option<String>),
RecordNumber(String),
RichText(String),
SingleLineText(String),
Status(String),
StatusAssignee(Vec<User>),
Subtable(Vec<TableRow>),
Time(Option<NaiveTime>),
UpdatedTime(DateTime<FixedOffset>),
UserSelect(Vec<User>),
__ID__(u64),
__REVISION__(u64),
}Expand description
Represents the value of a field in a Kintone record.
Each variant corresponds to a specific field type and contains the appropriate value type.
The enum is marked as #[non_exhaustive] to allow for future field types without breaking changes.
§Examples
use kintone::model::record::FieldValue;
use chrono::{DateTime, FixedOffset, NaiveDate};
// Text field
let text_value = FieldValue::SingleLineText("Hello, world!".to_string());
// Date field
let date = NaiveDate::from_ymd_opt(2023, 12, 25).unwrap();
let date_value = FieldValue::Date(Some(date));
// Number field
let number_value = FieldValue::Number(Some(42.into()));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Calc(String)
Category(Vec<String>)
CheckBox(Vec<String>)
CreatedTime(DateTime<FixedOffset>)
Creator(User)
Date(Option<NaiveDate>)
DateTime(Option<DateTime<FixedOffset>>)
DropDown(Option<String>)
File(Vec<FileBody>)
GroupSelect(Vec<Group>)
Link(String)
Modifier(User)
MultiLineText(String)
MultiSelect(Vec<String>)
Number(Option<BigDecimal>)
OrganizationSelect(Vec<Organization>)
RadioButton(Option<String>)
RecordNumber(String)
RichText(String)
SingleLineText(String)
Status(String)
StatusAssignee(Vec<User>)
Subtable(Vec<TableRow>)
Time(Option<NaiveTime>)
UpdatedTime(DateTime<FixedOffset>)
UserSelect(Vec<User>)
__ID__(u64)
__REVISION__(u64)
Implementations§
Source§impl FieldValue
impl FieldValue
pub const fn field_type(&self) -> FieldType
Trait Implementations§
Source§impl Clone for FieldValue
impl Clone for FieldValue
Source§fn clone(&self) -> FieldValue
fn clone(&self) -> FieldValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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<'de> Deserialize<'de> for FieldValue
impl<'de> Deserialize<'de> for FieldValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for FieldValue
Source§impl PartialEq for FieldValue
impl PartialEq for FieldValue
Source§impl Serialize for FieldValue
impl Serialize for FieldValue
impl StructuralPartialEq for FieldValue
Auto Trait Implementations§
impl Freeze for FieldValue
impl RefUnwindSafe for FieldValue
impl Send for FieldValue
impl Sync for FieldValue
impl Unpin for FieldValue
impl UnsafeUnpin 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