cel_expr/types
CEL types, which declare the types of an environment’s variables and of
its custom functions’ overloads (see cel_expr/env), so that
expressions are type-checked as they compile.
Types
A CEL type.
pub type Type {
Int
Uint
Double
Bool
String
Bytes
Null
Dyn
Any
Timestamp
Duration
List(element: Type)
Map(key: Type, value: Type)
Message(name: String)
Wrapper(Type)
TypeOf(Type)
Param(name: String)
Opaque(name: String, parameters: List(Type))
}
Constructors
-
Int -
Uint -
Double -
Bool -
String -
Bytes -
NullThe type of
null. -
DynAny type, checked as the expression is evaluated.
-
Anygoogle.protobuf.Any. -
Timestamp -
Duration -
List(element: Type) -
-
Message(name: String)A protobuf message type, by full name, such as
example.v1.User, which the environment’s provider knows. -
Wrapper(Type)A protobuf wrapper of a primitive type, such as
google.protobuf.Int64ValueforWrapper(Int), whichnullcan also be assigned to. -
TypeOf(Type)The type of types, whose values are the given type.
-
Param(name: String)A type parameter of an overload, by name, which the arguments’ types bind:
List(Param("T"))toParam("T")is a function from a list to its elements’ type. -
Opaque(name: String, parameters: List(Type))An abstract type with type parameters, such as
optional_type(int).