#[repr(u8)]pub enum ValueKind {
Show 16 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,
Opaque = 17,
}
Expand description
Represents the value kinds in CEL’s value system.
This enum is a subset of Kind
that specifically represents value kinds
in the CEL value system. It is used for runtime value type checking and
value operations. Each variant corresponds to a specific value category
that can be used in value operations and runtime type checking.
§Relationship with Kind
ValueKind
is a specialized view of Kind
that only includes variants
relevant to value operations. It maintains the same variant values as Kind
for compatibility, but provides a more focused interface for value-related
operations.
§Examples
use cel_cxx_ffi::common::{Kind, ValueKind};
// ValueKind can be converted to Kind
let value_kind = ValueKind::Int;
let kind: Kind = value_kind.into();
assert!(kind.is_value_kind());
// Not all Kind variants are valid ValueKinds
assert!(Kind::Int.is_value_kind());
assert!(!Kind::Function.is_value_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
Opaque = 17
Trait Implementations§
Source§impl ExternType for ValueKind
impl ExternType for ValueKind
Source§impl SpanElement for ValueKind
impl SpanElement for ValueKind
impl Copy for ValueKind
impl Eq for ValueKind
impl StructuralPartialEq for ValueKind
Auto Trait Implementations§
impl Freeze for ValueKind
impl RefUnwindSafe for ValueKind
impl Send for ValueKind
impl Sync for ValueKind
impl Unpin for ValueKind
impl UnwindSafe for ValueKind
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