pub struct NodeType(pub String);Expand description
A JavaScript holder, carried alongside the tree so Node::cast and
Node::store know which of the three coercions — or none — a value
needs on its way into a place.
Not a type in any sense the language enforces: plain JavaScript
checks nothing here, and every field but the tag itself is
unreachable at run time. It exists for the same reason
crate::emit::lua::LuaType does — “the nominal type a local is
annotated with, which in Lua is nothing at all” — with "boolean",
"number", "bigint" and "string" as the tags Node::cast acts
on and every other tag passed through unchanged.
Tuple Fields§
§0: StringTrait Implementations§
impl Eq for NodeType
impl StructuralPartialEq for NodeType
Auto Trait Implementations§
impl Freeze for NodeType
impl RefUnwindSafe for NodeType
impl Send for NodeType
impl Sync for NodeType
impl Unpin for NodeType
impl UnsafeUnpin for NodeType
impl UnwindSafe for NodeType
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