pub enum Value {
Prim8(u8),
Prim16(u16),
Prim32(u32),
Prim64(u64),
Text(String),
Tuple(Vec<Value>),
Array(Vec<Value>),
Enum(usize, Box<Value>),
}Expand description
Generic Lutra value object
Variants§
Prim8(u8)
Prim16(u16)
Prim32(u32)
Prim64(u64)
Text(String)
Tuple(Vec<Value>)
Array(Vec<Value>)
Enum(usize, Box<Value>)
Implementations§
Source§impl Value
impl Value
pub fn unit() -> Value
pub fn expect_prim8(&self) -> Result<u8>
pub fn expect_prim16(&self) -> Result<u16>
pub fn expect_prim32(&self) -> Result<u32>
pub fn expect_prim64(&self) -> Result<u64>
pub fn expect_text(&self) -> Result<&str>
pub fn expect_tuple(&self) -> Result<&[Value]>
pub fn expect_array(&self) -> Result<&[Value]>
pub fn expect_enum(&self) -> Result<(usize, &Value)>
Trait Implementations§
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