pub enum EvaluationContextFieldValue {
Bool(bool),
Int(i64),
Float(f64),
String(String),
DateTime(OffsetDateTime),
Struct(Arc<dyn Any + Send + Sync>),
}
Expand description
Value type of evaluation context custom fields.
Variants§
Bool(bool)
Int(i64)
Float(f64)
String(String)
DateTime(OffsetDateTime)
Struct(Arc<dyn Any + Send + Sync>)
Implementations§
Source§impl EvaluationContextFieldValue
impl EvaluationContextFieldValue
Sourcepub fn new_struct<T>(value: T) -> Self
pub fn new_struct<T>(value: T) -> Self
Create a new EvaluationContextFieldValue
instance with given struct value
.
Sourcepub fn is_date_time(&self) -> bool
pub fn is_date_time(&self) -> bool
Return true
if this is a OffsetDateTime
value.
Sourcepub fn as_date_time(&self) -> Option<&OffsetDateTime>
pub fn as_date_time(&self) -> Option<&OffsetDateTime>
Try to convert self
to OffsetDateTime
.
Trait Implementations§
Source§impl Clone for EvaluationContextFieldValue
impl Clone for EvaluationContextFieldValue
Source§fn clone(&self) -> EvaluationContextFieldValue
fn clone(&self) -> EvaluationContextFieldValue
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 EvaluationContextFieldValue
impl Debug for EvaluationContextFieldValue
Source§impl From<&str> for EvaluationContextFieldValue
impl From<&str> for EvaluationContextFieldValue
Source§impl From<OffsetDateTime> for EvaluationContextFieldValue
impl From<OffsetDateTime> for EvaluationContextFieldValue
Source§fn from(value: OffsetDateTime) -> Self
fn from(value: OffsetDateTime) -> Self
Converts to this type from the input type.
Source§impl From<String> for EvaluationContextFieldValue
impl From<String> for EvaluationContextFieldValue
Source§impl From<bool> for EvaluationContextFieldValue
impl From<bool> for EvaluationContextFieldValue
Source§impl From<f32> for EvaluationContextFieldValue
impl From<f32> for EvaluationContextFieldValue
Source§impl From<f64> for EvaluationContextFieldValue
impl From<f64> for EvaluationContextFieldValue
Source§impl From<i16> for EvaluationContextFieldValue
impl From<i16> for EvaluationContextFieldValue
Source§impl From<i32> for EvaluationContextFieldValue
impl From<i32> for EvaluationContextFieldValue
Source§impl From<i64> for EvaluationContextFieldValue
impl From<i64> for EvaluationContextFieldValue
Source§impl From<i8> for EvaluationContextFieldValue
impl From<i8> for EvaluationContextFieldValue
Source§impl From<u16> for EvaluationContextFieldValue
impl From<u16> for EvaluationContextFieldValue
Source§impl From<u32> for EvaluationContextFieldValue
impl From<u32> for EvaluationContextFieldValue
Source§impl From<u8> for EvaluationContextFieldValue
impl From<u8> for EvaluationContextFieldValue
Auto Trait Implementations§
impl Freeze for EvaluationContextFieldValue
impl !RefUnwindSafe for EvaluationContextFieldValue
impl Send for EvaluationContextFieldValue
impl Sync for EvaluationContextFieldValue
impl Unpin for EvaluationContextFieldValue
impl !UnwindSafe for EvaluationContextFieldValue
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