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 !RefUnwindSafe for EvaluationContextFieldValue
impl Send for EvaluationContextFieldValue
impl Sync for EvaluationContextFieldValue
impl Unpin for EvaluationContextFieldValue
impl !UnwindSafe for EvaluationContextFieldValue
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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