pub struct LuaNodeCursor(/* private fields */);Expand description
Nullable traversal position in a table’s hash-node array.
Unsafe navigation requires cursors from the same live node allocation and an in-bounds non-null position where a node is accessed. Resizing the table invalidates every cursor.
Implementations§
Source§impl LuaNodeCursor
impl LuaNodeCursor
Sourcepub const fn as_ptr(&self) -> *mut RawLuaNode
pub const fn as_ptr(&self) -> *mut RawLuaNode
Returns the current traversal address, which may be null.
Table resize and rehash invalidate cursors into the old node array.
pub const fn from_ptr(raw: *mut RawLuaNode) -> Self
pub const fn is_null(&self) -> bool
pub unsafe fn node_unchecked(&self) -> LuaNode
pub fn node(&self) -> Option<LuaNode>
pub unsafe fn add(self, count: usize) -> Self
pub unsafe fn sub(self, count: usize) -> Self
pub unsafe fn offset(self, count: isize) -> Self
pub unsafe fn offset_from(self, other: Self) -> isize
Trait Implementations§
Source§impl AsRef<LuaNodeCursor> for LuaNodeCursor
impl AsRef<LuaNodeCursor> for LuaNodeCursor
Source§fn as_ref(&self) -> &LuaNodeCursor
fn as_ref(&self) -> &LuaNodeCursor
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for LuaNodeCursor
impl Clone for LuaNodeCursor
Source§fn clone(&self) -> LuaNodeCursor
fn clone(&self) -> LuaNodeCursor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LuaNodeCursor
impl Eq for LuaNodeCursor
Source§impl Ord for LuaNodeCursor
impl Ord for LuaNodeCursor
Source§fn cmp(&self, other: &LuaNodeCursor) -> Ordering
fn cmp(&self, other: &LuaNodeCursor) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LuaNodeCursor
impl PartialEq for LuaNodeCursor
Source§impl PartialOrd for LuaNodeCursor
impl PartialOrd for LuaNodeCursor
impl StructuralPartialEq for LuaNodeCursor
Auto Trait Implementations§
impl !Send for LuaNodeCursor
impl !Sync for LuaNodeCursor
impl Freeze for LuaNodeCursor
impl RefUnwindSafe for LuaNodeCursor
impl Unpin for LuaNodeCursor
impl UnsafeUnpin for LuaNodeCursor
impl UnwindSafe for LuaNodeCursor
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