pub enum Value {
Nil,
Bool(bool),
Number(f64),
String(String),
Array(ArrayValue),
Object(ObjectValue),
Table(TableValue),
Function(FunctionHandle),
Native(NativeHandle),
Host(HostHandle),
Task(TaskHandle),
}Expand description
Core runtime value.
Variants§
Nil
Absence of a value.
Bool(bool)
Boolean value.
Number(f64)
Kinetik number, represented as an IEEE-754 64-bit float.
String(String)
UTF-8 string value.
Array(ArrayValue)
Ordered array value.
Object(ObjectValue)
Plain JSON-native object value.
Table(TableValue)
Programmable table value.
Function(FunctionHandle)
Script function handle.
Native(NativeHandle)
Host/native value handle.
Host(HostHandle)
Opaque host object handle.
Task(TaskHandle)
Task/coroutine handle.
Implementations§
Source§impl Value
impl Value
Sourcepub fn object(fields: impl IntoIterator<Item = (String, Value)>) -> Value
pub fn object(fields: impl IntoIterator<Item = (String, Value)>) -> Value
Creates a plain object value.
Sourcepub const fn function(id: FunctionId) -> Value
pub const fn function(id: FunctionId) -> Value
Creates a script function handle value.
Trait Implementations§
Source§impl IntoValue for Value
impl IntoValue for Value
Source§fn into_value(self) -> Value
fn into_value(self) -> Value
Converts this value into a Kinetik value.
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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