pub enum FieldValue {
Show 20 variants
Null,
Bool(bool),
Int(i64),
Float(f64),
String(String),
Json(Value),
Bytes(Vec<u8>),
DateTime(String),
Uuid(String),
Array(Vec<FieldValue>),
Nested(Box<DataBuilder>),
Connect(ConnectData),
Disconnect,
Default,
Increment(i64),
Decrement(i64),
Multiply(f64),
Divide(f64),
Push(Box<FieldValue>),
Unset,
}Expand description
A field value that can be set in create/update operations.
Variants§
Null
Null value.
Bool(bool)
Boolean value.
Int(i64)
Integer value.
Float(f64)
Float value.
String(String)
String value.
Json(Value)
JSON value.
Bytes(Vec<u8>)
Bytes value.
DateTime(String)
DateTime as ISO string.
Uuid(String)
UUID as string.
Array(Vec<FieldValue>)
Array of values.
Nested(Box<DataBuilder>)
Nested create data.
Connect(ConnectData)
Connect to existing record.
Disconnect
Disconnect from related record.
Default
Set to default value.
Increment(i64)
Increment by value.
Decrement(i64)
Decrement by value.
Multiply(f64)
Multiply by value.
Divide(f64)
Divide by value.
Push(Box<FieldValue>)
Append to array.
Unset
Unset the field.
Implementations§
Source§impl FieldValue
impl FieldValue
Sourcepub fn to_filter_value(&self) -> Option<FilterValue>
pub fn to_filter_value(&self) -> Option<FilterValue>
Convert to FilterValue for query operations.
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 · 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
Source§impl From<&str> for FieldValue
impl From<&str> for FieldValue
Source§impl<T: Into<FieldValue>> From<Option<T>> for FieldValue
impl<T: Into<FieldValue>> From<Option<T>> for FieldValue
Source§impl From<String> for FieldValue
impl From<String> for FieldValue
Source§impl From<Value> for FieldValue
impl From<Value> for FieldValue
Source§impl<T: Into<FieldValue>> From<Vec<T>> for FieldValue
impl<T: Into<FieldValue>> From<Vec<T>> 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 From<i32> for FieldValue
impl From<i32> for FieldValue
Source§impl From<i64> for FieldValue
impl From<i64> 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 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