#[non_exhaustive]pub enum Data {
Nil,
Bool(bool),
Int(i64),
Num(f64),
Str(String),
Table(Vec<(Data, Data)>),
}Expand description
Owned data that crosses between Rust and scripts by copy: no functions, userdata or
threads; tables become key-value lists in traversal order. More variants may come:
match with a _ arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Nil
nil.
Bool(bool)
A boolean.
Int(i64)
An integer.
Num(f64)
A float.
Str(String)
A string (invalid UTF-8 replaced).
Table(Vec<(Data, Data)>)
A table’s entries.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Data
Auto Trait Implementations§
impl Forget for Data
impl Freeze for Data
impl Move for Data
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnsafeUnpin for Data
impl UnwindSafe for Data
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