pub struct TableData {
pub entries: Vec<(Key, Value)>,
pub serialize_meta: Option<MetaFn>,
pub tostring_meta: Option<MetaFn>,
}Expand description
The backing store for a table.
entries keeps insertion order for hash keys, which stands in for Lua’s raw
pairs order. The optional metamethods model __serialize and __tostring.
Fields§
§entries: Vec<(Key, Value)>Ordered key/value pairs, including integer keys.
serialize_meta: Option<MetaFn>__serialize metamethod. When present and successful, its result
replaces the table during serialization.
tostring_meta: Option<MetaFn>__tostring metamethod. Used when __serialize is absent, gated by the
metatostring option.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TableData
impl !Send for TableData
impl !Sync for TableData
impl !UnwindSafe for TableData
impl Freeze for TableData
impl Unpin for TableData
impl UnsafeUnpin for TableData
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