pub enum RuntimeValue {
Nat(u64),
Bool(bool),
List(Vec<RuntimeValue>),
Unit,
}Expand description
Runtime representation of type-level values.
This enum provides a uniform way to inspect type-level values at runtime, regardless of their original type-level encoding.
§Examples
use reify_reflect_core::RuntimeValue;
let nat = RuntimeValue::Nat(42);
let boolean = RuntimeValue::Bool(true);
let list = RuntimeValue::List(vec![
RuntimeValue::Nat(1),
RuntimeValue::Nat(2),
]);
let unit = RuntimeValue::Unit;
assert_eq!(nat, RuntimeValue::Nat(42));Variants§
Nat(u64)
A natural number.
Bool(bool)
A boolean.
List(Vec<RuntimeValue>)
A list of runtime values.
Unit
The unit value.
Trait Implementations§
Source§impl Clone for RuntimeValue
impl Clone for RuntimeValue
Source§fn clone(&self) -> RuntimeValue
fn clone(&self) -> RuntimeValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RuntimeValue
impl Debug for RuntimeValue
Source§impl PartialEq for RuntimeValue
impl PartialEq for RuntimeValue
impl StructuralPartialEq for RuntimeValue
Auto Trait Implementations§
impl Freeze for RuntimeValue
impl RefUnwindSafe for RuntimeValue
impl Send for RuntimeValue
impl Sync for RuntimeValue
impl Unpin for RuntimeValue
impl UnsafeUnpin for RuntimeValue
impl UnwindSafe for RuntimeValue
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