#[repr(u8)]pub enum TypeKind {
Show 27 variants
Null = 0,
Bool = 1,
Int = 2,
Uint = 3,
Double = 4,
String = 5,
Bytes = 6,
Struct = 7,
Duration = 8,
Timestamp = 9,
List = 10,
Map = 11,
Unknown = 12,
Type = 13,
Error = 14,
Any = 15,
Dyn = 16,
Opaque = 17,
BoolWrapper = 18,
IntWrapper = 19,
UintWrapper = 20,
DoubleWrapper = 21,
StringWrapper = 22,
BytesWrapper = 23,
TypeParam = 24,
Function = 25,
Enum = 26,
}
Expand description
Represents the type kinds in CEL’s type system.
This enum is a subset of Kind
that specifically represents type kinds
in the CEL type system. It is used for type checking and type inference
operations. Each variant corresponds to a specific type category that can
be used in type declarations and type checking.
§Relationship with Kind
TypeKind
is a specialized view of Kind
that only includes variants
relevant to type system operations. It maintains the same variant values
as Kind
for compatibility, but provides a more focused interface for
type-related operations.
§Examples
use cel_cxx_ffi::common::{Kind, TypeKind};
// TypeKind can be converted to Kind
let type_kind = TypeKind::Int;
let kind: Kind = type_kind.into();
assert!(kind.is_type_kind());
Variants§
Null = 0
Bool = 1
Int = 2
Uint = 3
Double = 4
String = 5
Bytes = 6
Struct = 7
Duration = 8
Timestamp = 9
List = 10
Map = 11
Unknown = 12
Type = 13
Error = 14
Any = 15
Dyn = 16
Opaque = 17
BoolWrapper = 18
IntWrapper = 19
UintWrapper = 20
DoubleWrapper = 21
StringWrapper = 22
BytesWrapper = 23
TypeParam = 24
Function = 25
Enum = 26
Trait Implementations§
Source§impl ExternType for TypeKind
impl ExternType for TypeKind
Source§impl SpanElement for TypeKind
impl SpanElement for TypeKind
impl Copy for TypeKind
impl Eq for TypeKind
impl StructuralPartialEq for TypeKind
Auto Trait Implementations§
impl Freeze for TypeKind
impl RefUnwindSafe for TypeKind
impl Send for TypeKind
impl Sync for TypeKind
impl Unpin for TypeKind
impl UnwindSafe for TypeKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more