Struct hlua_badtouch::PushGuard [] [src]

pub struct PushGuard<L> { /* fields omitted */ }

RAII guard for a value pushed on the stack.

You shouldn't have to manipulate this type directly unless you are fiddling with the library's internals.

Methods

impl<'lua, L> PushGuard<L> where
    L: AsMutLua<'lua>, 
[src]

[src]

Creates a new PushGuard from this Lua context representing size items on the stack. When this PushGuard is destroyed, size items will be popped.

This is unsafe because the Lua stack can be corrupted if this is misused.

[src]

Returns the number of elements managed by this PushGuard.

[src]

Prevents the value from being popped when the PushGuard is destroyed, and returns the number of elements on the Lua stack.

This is unsafe because the Lua stack can be corrupted if this is misused.

[src]

Destroys the guard, popping the value. Returns the inner part, which returns access when using by-value capture.

Trait Implementations

impl<L: Debug> Debug for PushGuard<L>
[src]

[src]

Formats the value using the given formatter. Read more

impl<'lua, L> AsLua<'lua> for PushGuard<L> where
    L: AsMutLua<'lua>, 
[src]

[src]

impl<'lua, L> AsMutLua<'lua> for PushGuard<L> where
    L: AsMutLua<'lua>, 
[src]

[src]

Returns the raw Lua context.

impl<L> Drop for PushGuard<L>
[src]

[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl<L> Send for PushGuard<L> where
    L: Send

impl<L> !Sync for PushGuard<L>