pub enum Constant {
Nil,
Boolean {
value: bool,
},
Number {
bits: u64,
},
String {
string: u32,
},
Import {
import_id: u32,
},
Table {
keys: Vec<u32>,
},
Closure {
proto: u32,
},
Vector {
bits: [u32; 4],
},
TableWithConstants {
entries: Vec<TableEntry>,
},
Integer {
value: i64,
},
ClassShape {
shape: ClassShape,
},
}Expand description
Constant table entry.
Variants§
Nil
Nil.
Boolean
Boolean.
Number
Floating-point number, stored by exact bits.
String
One-based string-table id.
Import
Packed import id.
Table
Table shape.
Closure
Closure proto reference.
Vector
Vector, stored by exact f32 bits.
TableWithConstants
Table shape with constant payloads.
Fields
§
entries: Vec<TableEntry>Key/value entries.
Integer
64-bit integer.
ClassShape
Class shape.
Fields
§
shape: ClassShapeShape payload.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Constant
impl<'de> Deserialize<'de> for Constant
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Constant
Auto Trait Implementations§
impl Freeze for Constant
impl RefUnwindSafe for Constant
impl Send for Constant
impl Sync for Constant
impl Unpin for Constant
impl UnsafeUnpin for Constant
impl UnwindSafe for Constant
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