#[repr(u8)]pub enum ValueKind {
Show 22 variants
Nil = 0,
Bool = 1,
Int = 2,
UInt = 3,
Float = 4,
Char = 5,
Symbol = 6,
Enum = 7,
Ref = 8,
Bytes = 9,
Text = 10,
List = 11,
Set = 12,
Table = 13,
Callable = 14,
Escape = 15,
Object = 32,
Resource = 33,
Temporal = 34,
Color = 35,
Pair = 36,
Unknown = 255,
}Expand description
๐ชช ๐ฑ The semantic category of a value word.
๐ data/value::ValueKind
๐ฆ size_of::<ValueKind>() == 1 bytes / 8 bits
โ๏ธOption<T> ๐ฐ T
Variantsยง
Nil = 0
๐ฑ No value.
Bool = 1
A boolean truth value.
Int = 2
A signed integer value of unspecified width.
UInt = 3
An unsigned integer value of unspecified width.
Float = 4
A floating-point numeric value of unspecified width.
Char = 5
A character-like scalar value.
Symbol = 6
An interned or externally resolved symbolic identifier.
Enum = 7
A closed local choice from a finite set.
Ref = 8
A generic reference into another memory domain.
Bytes = 9
A byte sequence or byte-oriented value.
Text = 10
A text or string-like value.
List = 11
An ordered aggregate.
Set = 12
A membership aggregate.
Table = 13
A relational, record-like, or columnar aggregate.
Callable = 14
A callable, closure, function, command, or executable binding.
Escape = 15
A value not directly expressible by the local layout or profile.
Object = 32
A domain-specific or externally interpreted body.
Resource = 33
A resource-like body managed outside the value itself.
Temporal = 34
A time-shaped value such as a point, span, date, duration, or tick.
Color = 35
A color value or visual scalar.
Pair = 36
A minimal two-part composition.
Unknown = 255
An unknown, invalid, or profile-unmapped kind.
Implementationsยง
Sourceยงimpl ValueKind
impl ValueKind
Sourcepub const fn is_compact(self) -> bool
pub const fn is_compact(self) -> bool
Returns whether this kind belongs to the compact universal band.
Sourcepub const fn is_ref_like(self) -> bool
pub const fn is_ref_like(self) -> bool
Returns whether this kind points outside the immediate value body.
Sourcepub const fn is_aggregate(self) -> bool
pub const fn is_aggregate(self) -> bool
Returns whether this kind describes aggregate data.
Sourcepub const fn is_callable(self) -> bool
pub const fn is_callable(self) -> bool
Returns whether this kind describes callable behavior.
Sourcepub const fn is_object(self) -> bool
pub const fn is_object(self) -> bool
Returns whether this kind describes a domain-specific body.
Sourcepub const fn is_resource(self) -> bool
pub const fn is_resource(self) -> bool
Returns whether this kind describes an externally managed resource.
Sourcepub const fn is_escape(self) -> bool
pub const fn is_escape(self) -> bool
Returns whether this kind needs profile-specific decoding or widening.
Sourcepub const fn is_unknown(self) -> bool
pub const fn is_unknown(self) -> bool
Returns whether this kind is unknown or unmapped.
Trait Implementationsยง
impl Copy for ValueKind
impl Eq for ValueKind
Sourceยงimpl Ord for ValueKind
impl Ord for ValueKind
1.21.0 (const: unstable) ยท Sourceยงfn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) ยท Sourceยงfn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Sourceยงimpl PartialOrd for ValueKind
impl PartialOrd 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 UnsafeUnpin for ValueKind
impl UnwindSafe for ValueKind
Blanket Implementationsยง
Sourceยงimpl<T> AnyExt for T
impl<T> AnyExt for T
Sourceยงfn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
TypeId of Self using a custom hasher.Sourceยงfn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Sourceยงfn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
fn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
alloc only.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
Sourceยงimpl<T> ByteSized for T
impl<T> ByteSized for T
Sourceยงconst BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
Sourceยงfn byte_align(&self) -> usize
fn byte_align(&self) -> usize
Sourceยงfn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<T> MemExt for Twhere
T: ?Sized,
impl<T> MemExt for Twhere
T: ?Sized,
Sourceยงconst NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Sourceยงfn mem_align_of<T>() -> usize
fn mem_align_of<T>() -> usize
Sourceยงfn mem_align_of_val(&self) -> usize
fn mem_align_of_val(&self) -> usize
Sourceยงfn mem_size_of<T>() -> usize
fn mem_size_of<T>() -> usize
Sourceยงfn mem_size_of_val(&self) -> usize
fn mem_size_of_val(&self) -> usize
Sourceยงfn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
true if dropping values of this type matters. Read moreSourceยงfn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
self without running its destructor. Read moreSourceยงfn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Sourceยงunsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSourceยงunsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSourceยงfn mem_as_bytes(&self) -> &[u8] โ
fn mem_as_bytes(&self) -> &[u8] โ
unsafe_slice only.