This is most useful when poking at the Lua state directly.
The most important methods made public are new to create a new
PushGuard, and forget to not run this PushGuard's destructor.
They're both unsafe because their misuse can easily cause the Lua
stack to be out of sync with Rust PushGuards.
Also expose a size method to access the number of elements this
PushGuard is managing, and provide an internal-only safe version of
forget under the assumption that consumers within this crate know what
they're doing.
This is most useful when poking at the Lua state directly.
The most important methods made public are
new
to create a newPushGuard
, andforget
to not run thisPushGuard
's destructor. They're both unsafe because their misuse can easily cause the Lua stack to be out of sync with RustPushGuard
s.Also expose a
size
method to access the number of elements thisPushGuard
is managing, and provide an internal-only safe version offorget
under the assumption that consumers within this crate know what they're doing.