Struct tlua::AbsoluteIndex
source · pub struct AbsoluteIndex(/* private fields */);
Implementations§
source§impl AbsoluteIndex
impl AbsoluteIndex
sourcepub fn new<L>(index: NonZeroI32, lua: L) -> Selfwhere
L: AsLua,
pub fn new<L>(index: NonZeroI32, lua: L) -> Selfwhere
L: AsLua,
Convert the non-zero index into an absolute index.
Panicking
Will panic if index
equals to -1 - lua_gettop(lua)
.
sourcepub fn try_new<L>(index: impl Into<i32>, lua: L) -> Option<Self>where
L: AsLua,
pub fn try_new<L>(index: impl Into<i32>, lua: L) -> Option<Self>where
L: AsLua,
Convert the non-zero index
into an absolute index or return None
if
the result would not be non-zero.
sourcepub unsafe fn new_unchecked(index: NonZeroI32) -> Self
pub unsafe fn new_unchecked(index: NonZeroI32) -> Self
Safety
index
must be a valid absolute or relative index into the lua stack
with which it’s going to be used
pub fn get(&self) -> u32
Trait Implementations§
source§impl Clone for AbsoluteIndex
impl Clone for AbsoluteIndex
source§fn clone(&self) -> AbsoluteIndex
fn clone(&self) -> AbsoluteIndex
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AbsoluteIndex
impl Debug for AbsoluteIndex
source§impl From<AbsoluteIndex> for i32
impl From<AbsoluteIndex> for i32
source§fn from(index: AbsoluteIndex) -> i32
fn from(index: AbsoluteIndex) -> i32
Converts to this type from the input type.
impl Copy for AbsoluteIndex
Auto Trait Implementations§
impl RefUnwindSafe for AbsoluteIndex
impl Send for AbsoluteIndex
impl Sync for AbsoluteIndex
impl Unpin for AbsoluteIndex
impl UnwindSafe for AbsoluteIndex
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