pub struct TagPair {
pub key: &'static str,
pub value: &'static str,
}Expand description
A dictionary of string to the four basic Lua types: string, boolean, number, table.
Note that the API returns tags as a simple table, meaning any modifications to it will not propagate back to the game. Thus, to modify a set of tags, the whole table needs to be written back to the respective property.
Tables inside Tags that have numeric keys but are not sequences (e.g. tags = {foo = {nil, "something"}} or tags = {bar = {[4] = "cat"}}) will have their keys converted to strings when read back from the game (e.g. {foo = {["2"] = "something"}} or {bar = {["4"] = "cat"}}). Only sequences without gaps will have their keys maintained as numeric.
One string entry in a Tags table.
Fields§
§key: &'static str§value: &'static strTrait Implementations§
impl Copy for TagPair
impl Eq for TagPair
impl StructuralPartialEq for TagPair
Auto Trait Implementations§
impl Freeze for TagPair
impl RefUnwindSafe for TagPair
impl Send for TagPair
impl Sync for TagPair
impl Unpin for TagPair
impl UnsafeUnpin for TagPair
impl UnwindSafe for TagPair
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