pub enum FeelType {
}Variants§
Any
Type representing any valid FEEL type.
Boolean
Type representing a boolean value.
Context(BTreeMap<Name, FeelType>)
Type representing a context value.
Date
Type representing a date value.
DateTime
Type representing adate and time value.
DaysAndTimeDuration
Type representing a days and time duration value.
Function(Vec<FeelType>, Box<FeelType>)
Type representing a function value.
Tuple Fields
List(Box<FeelType>)
Type representing a list of values.
Null
Type representing a null value.
Number
Type representing a number value.
Range(Box<FeelType>)
Type representing a range values.
String
Type representing a string value.
Time
Type representing a time value.
YearsAndMonthsDuration
Type representing a years and months duration value.
Implementations§
Source§impl FeelType
impl FeelType
pub fn get_conformant_value(&self, actual_value: &Value) -> Value
Sourcepub fn get_value_checked(&self, value: &Value) -> Result<Value>
pub fn get_value_checked(&self, value: &Value) -> Result<Value>
Returns a new value cloned from provided value, and retrieved with type checking.
Sourcepub fn is_simple_built_in_type(&self) -> bool
pub fn is_simple_built_in_type(&self) -> bool
Returns true when this type is a simple FEEL type.
Sourcepub fn range(elements_type: &FeelType) -> FeelType
pub fn range(elements_type: &FeelType) -> FeelType
Creates a range type with specified elements’ type.
Sourcepub fn context(entries_types: &[(&Name, &FeelType)]) -> FeelType
pub fn context(entries_types: &[(&Name, &FeelType)]) -> FeelType
Creates a context type with specified entries.
Sourcepub fn function(
parameter_types: &[FeelType],
result_type: &FeelType,
) -> FeelType
pub fn function( parameter_types: &[FeelType], result_type: &FeelType, ) -> FeelType
Creates a function type with specified parameter types and result type.
Sourcepub fn is_conformant(&self, target_type: &FeelType) -> bool
pub fn is_conformant(&self, target_type: &FeelType) -> bool
Checks if this type is conformant with specified target type.
Sourcepub fn instance_of(&self, other: &FeelType) -> bool
pub fn instance_of(&self, other: &FeelType) -> bool
Checks if this type is an instance of the other type.