pub enum FeelType {
Show 14 variants Any, Boolean, Context(BTreeMap<Name, FeelType>), Date, DateTime, DaysAndTimeDuration, Function(Vec<FeelType>, Box<FeelType>), List(Box<FeelType>), Null, Number, Range(Box<FeelType>), String, Time, YearsAndMonthsDuration,
}

Variants

Any

Type representing any valid FEEL type.

Boolean

Type representing a boolean value.

Context(BTreeMap<Name, FeelType>)

Tuple Fields

0: BTreeMap<Name, FeelType>

Types of context entries.

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

0: Vec<FeelType>

List of types of the function’s parameters.

1: Box<FeelType>

Type of the function’s result.

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 is List<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 list type with specified items’ 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

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 a FEEL name to built-in type.

Converts a string to built-in type.

The associated error which can be returned from parsing.

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

This method tests for !=.

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.