Skip to main content

TKey

Struct TKey 

Source
pub struct TKey { /* private fields */ }
Expand description

Non-owning view of a live table-key record.

Unsafe operations require the owning table storage to remain live and the key’s tag/payload and collision-chain encoding to remain valid.

Implementations§

Source§

impl TKey

Source

pub const unsafe fn from_raw(raw: NonNull<RawTKey>) -> Self

Source

pub fn set_nil(&self)

Source

pub fn tt(&self) -> i32

Source

pub fn set_tt(&self, tt: i32)

setttype

Source

pub fn next(&self) -> i32

Source

pub fn set_next(&self, next: i32)

gnext

Source

pub fn is_nil(&self) -> bool

Source

pub fn is_dead_key(&self) -> bool

Source

pub fn is_collectable(&self) -> bool

iscollectable

Source

pub fn gc_value(&self) -> GcObject

gcvalue

Source

pub fn pointer_value(&self) -> *mut ()

pvalue

Source

pub fn number_value(&self) -> f64

nvalue

Source

pub fn integer_value(&self) -> i64

lvalue

Source

pub fn boolean_value(&self) -> i32

bvalue

Source

pub fn light_userdata_tag(&self) -> i32

lightuserdatatag

Source

pub fn vector_value(&self) -> [f32; 3]

vvalue

Source

pub fn raw_equal_value(&self, other: impl Into<TValue>) -> bool

luaO_rawequalKey

Trait Implementations§

Source§

impl AsRef<TKey> for TKey

Source§

fn as_ref(&self) -> &TKey

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for TKey

Source§

fn clone(&self) -> TKey

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for TKey

Source§

impl Eq for TKey

Source§

impl PartialEq for TKey

Source§

fn eq(&self, other: &TKey) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl RawHandle for TKey

Source§

type Raw = RawTKey

Raw VM record addressed by this handle.
Source§

fn as_ptr(&self) -> *mut Self::Raw

Returns the record address without dereferencing it.
Source§

impl StructuralPartialEq for TKey

Auto Trait Implementations§

§

impl !Send for TKey

§

impl !Sync for TKey

§

impl Freeze for TKey

§

impl RefUnwindSafe for TKey

§

impl Unpin for TKey

§

impl UnsafeUnpin for TKey

§

impl UnwindSafe for TKey

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.