Enum dmntk_feel::values::Value[][src]

pub enum Value {
Show 38 variants Boolean(bool), BuiltInFunction(Bif), ExpressionList(Values), Context(FeelContext), ContextEntry(NameBox<Value>), ContextEntryKey(Name), ContextType(FeelType), ContextTypeEntry(NameFeelType), ContextTypeEntryKey(Name), Date(FeelDate), DateTime(FeelDateTime), DaysAndTimeDuration(FeelDaysAndTimeDuration), FeelType(FeelType), FormalParameter(NameFeelType), FormalParameters(Vec<(Name, FeelType)>), FunctionBody(FunctionBody), FunctionDefinition(Vec<(Name, FeelType)>, FunctionBodyFeelType), IntervalEnd(Box<Value>, bool), IntervalStart(Box<Value>, bool), Irrelevant, List(Values), NamedParameter(Box<Value>, Box<Value>), NamedParameters(BTreeMap<Name, (Value, usize)>), NegatedCommaList(Values), Null(Option<String>), Number(FeelNumber), ParameterName(Name), ParameterTypes(Vec<Value>), PositionalParameters(Values), QualifiedNameSegment(Name), Range(Box<Value>, boolBox<Value>, bool), String(String), Time(FeelTime), UnaryGreater(Box<Value>), UnaryGreaterOrEqual(Box<Value>), UnaryLess(Box<Value>), UnaryLessOrEqual(Box<Value>), YearsAndMonthsDuration(FeelYearsAndMonthsDuration),
}
Expand description

FEEL value.

Variants

Boolean(bool)

Tuple Fields

0: bool

Value representing FEEL boolean type.

BuiltInFunction(Bif)

Tuple Fields

0: Bif

Value for storing built-in function definition.

ExpressionList(Values)

Tuple Fields

0: Values

Value representing a collection of comma-separated list of expressions.

Context(FeelContext)

Tuple Fields

Value representing a context.

ContextEntry(NameBox<Value>)

Tuple Fields

0: Name
1: Box<Value>

Value representing a context entry.

ContextEntryKey(Name)

Tuple Fields

0: Name

Value representing a key of the context entry.

ContextType(FeelType)

Tuple Fields

Value representing the context type.

ContextTypeEntry(NameFeelType)

Tuple Fields

0: Name

Value representing a context entry in context type definition.

ContextTypeEntryKey(Name)

Tuple Fields

0: Name

Value representing a key of the context entry in context type definition.

Date(FeelDate)

Tuple Fields

Value for storing dates as FeelDate.

DateTime(FeelDateTime)

Tuple Fields

Value for storing date and time as FeelDateTime.

DaysAndTimeDuration(FeelDaysAndTimeDuration)

Tuple Fields

Value for days and time durations.

FeelType(FeelType)

Tuple Fields

Value representing the FEEL type of a value.

FormalParameter(NameFeelType)

Tuple Fields

0: Name

Value representing function’s formal parameter with name and type.

FormalParameters(Vec<(Name, FeelType)>)

Tuple Fields

List of formal parameters.

FunctionBody(FunctionBody)

Tuple Fields

Definition of the function body.

FunctionDefinition(Vec<(Name, FeelType)>, FunctionBodyFeelType)

Tuple Fields

Value representing the function definition. This value holds the list of function’s formal parameters, the function’s body and expected result type.

IntervalEnd(Box<Value>, bool)

Tuple Fields

0: Box<Value>
1: bool

Value representing interval end.

IntervalStart(Box<Value>, bool)

Tuple Fields

0: Box<Value>
1: bool

Value representing interval start.

Irrelevant

Value representing FEEL irrelevant value.

List(Values)

Tuple Fields

0: Values

Value representing a list of values.

NamedParameter(Box<Value>, Box<Value>)

Tuple Fields

0: Box<Value>
1: Box<Value>

Named parameter.

NamedParameters(BTreeMap<Name, (Value, usize)>)

Tuple Fields

Value representing a collection of named parameters.

NegatedCommaList(Values)

Tuple Fields

0: Values

Value representing a collection of values representing a negated comma-separated list of expressions.

Null(Option<String>)

Tuple Fields

Null value with optional tracing message.

Number(FeelNumber)

Tuple Fields

Value representing FEEL number type.

ParameterName(Name)

Tuple Fields

0: Name

Name of the parameter.

ParameterTypes(Vec<Value>)

Tuple Fields

0: Vec<Value>

Value representing a list of function’s parameter types.

PositionalParameters(Values)

Tuple Fields

0: Values

List of positional parameters.

QualifiedNameSegment(Name)

Tuple Fields

0: Name

Value representing a segment of a qualified name.

Range(Box<Value>, boolBox<Value>, bool)

Tuple Fields

0: Box<Value>
1: bool
2: Box<Value>
3: bool

Value representing a range.

String(String)

Tuple Fields

0: String

String value…

Time(FeelTime)

Tuple Fields

Value for storing time as FeelTime.

UnaryGreater(Box<Value>)

Tuple Fields

0: Box<Value>

UnaryGreater value…

UnaryGreaterOrEqual(Box<Value>)

Tuple Fields

0: Box<Value>

UnaryGreaterOrEqual value…

UnaryLess(Box<Value>)

Tuple Fields

0: Box<Value>

UnaryLess value…

UnaryLessOrEqual(Box<Value>)

Tuple Fields

0: Box<Value>

UnaryLessOrEqual value…

YearsAndMonthsDuration(FeelYearsAndMonthsDuration)

Value for storing years and months duration.

Implementations

Returns true when the value is of type Value::Null.

Returns true when the value is of type Value::Boolean and is equal to true.

Returns true when the value is of type Value::Number.

Returns the type of this Value.

Tries to convert xsd:integer string into valid Value representing a number.

Tries to convert xsd:decimal string into valid Value representing a number.

Tries to convert xsd:double string into valid Value representing a number.

Tries to convert xsd:boolean string into valid Value representing a boolean.

Tries to convert xsd:date string into valid Value representing a date. FEEL date format is fully conformant with xsd:date.

Tries to convert xsd:time string into valid Value representing a time. FEEL time format is fully conformant with xsd:time.

Tries to convert xsd:dateTime string into valid Value representing a date and time. FEEL date and time format is fully conformant with xsd:dateTime.

Tries to convert xsd:duration string into valid Value representing a date and time. FEEL durations are conformant with xsd:duration but spit into two ranges.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Converts this FeelContext to its Value representation.

Converts a Value to its JSON representation.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Converts Value into FEEL string.

Tries to convert a Value to its FeelContext representation.

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.