Enum dmntk_feel::FeelType
source · [−]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>)
Tuple Fields
Type representing a function
value.
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
When a value appears in a certain context, it must be compatible with a type expected in that context, called the target type. After the type of the value is known, an implicit conversion from the type of the value to the target type can be performed. If an implicit conversion is mandatory but it cannot be performed, the result is null.
There are several possible type conversions:
-
to singleton list:
When the type of the value is
T
and the target type isList<T>
, the simple value is converted to a singleton list. -
from singleton list:
When the type of the value is List
, and the value is a singleton list and the target type is T, the value is converted by unwrapping the first element. -
conforms to:
When the type of the value is T1, the target type is T2, and T1 conforms to T2, the value remains unchanged. Otherwise the result is null.
All these conversion rules are implemented in this function.
Returns a new value cloned from provided value, and retrieved with type checking.
Returns true
when this type is a simple FEEL
type.
Creates a range
type with specified elements’ type.
Creates a context
type with specified entries.
Creates a function
type with specified parameter types and result type.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FeelType
impl UnwindSafe for FeelType
Blanket Implementations
Mutably borrows from an owned value. Read more