cel/common/
traits.rs

1/// ADDER_TYPE types provide a '+' operator overload.
2pub const ADDER_TYPE: u16 = 1;
3
4/// COMPARER_TYPE types support ordering comparisons '<', '<=', '>', '>='.
5pub const COMPARER_TYPE: u16 = ADDER_TYPE << 1;
6
7/// CONTAINER_TYPE types support 'in' operations.
8pub const CONTAINER_TYPE: u16 = COMPARER_TYPE << 1;
9
10/// DIVIDER_TYPE types support '/' operations.
11pub const DIVIDER_TYPE: u16 = CONTAINER_TYPE << 1;
12
13/// FIELD_TESTER_TYPE types support the detection of field value presence.
14pub const FIELD_TESTER_TYPE: u16 = DIVIDER_TYPE << 1;
15
16/// INDEXER_TYPE types support index access with dynamic values.
17pub const INDEXER_TYPE: u16 = FIELD_TESTER_TYPE << 1;
18
19/// ITERABLE_TYPE types can be iterated over in comprehensions.
20pub const ITERABLE_TYPE: u16 = INDEXER_TYPE << 1;
21
22/// ITERATOR_TYPE types support iterator semantics.
23pub const ITERATOR_TYPE: u16 = ITERABLE_TYPE << 1;
24
25/// MATCHER_TYPE types support pattern matching via 'matches' method.
26pub const MATCHER_TYPE: u16 = ITERATOR_TYPE << 1;
27
28/// MODDER_TYPE types support modulus operations '%'
29pub const MODDER_TYPE: u16 = MATCHER_TYPE << 1;
30
31/// MULTIPLIER_TYPE types support '*' operations.
32pub const MULTIPLIER_TYPE: u16 = MODDER_TYPE << 1;
33
34/// NEGATOR_TYPE types support either negation via '!' or '-'
35pub const NEGATOR_TYPE: u16 = MULTIPLIER_TYPE << 1;
36
37/// RECEIVER_TYPE types support dynamic dispatch to instance methods.
38pub const RECEIVER_TYPE: u16 = NEGATOR_TYPE << 1;
39
40/// SIZER_TYPE types support the size() method.
41pub const SIZER_TYPE: u16 = RECEIVER_TYPE << 1;
42
43/// SUBTRACTOR_TYPE types support '-' operations.
44pub const SUBTRACTOR_TYPE: u16 = SIZER_TYPE << 1;
45
46/// FOLDABLE_TYPE types support comprehensions v2 macros which iterate over (key, value) pairs.
47pub const FOLDABLE_TYPE: u16 = SUBTRACTOR_TYPE << 1;