pub struct PropertyKey(/* private fields */);Implementations§
Source§impl PropertyKey
impl PropertyKey
Sourcepub const fn index(index: u32) -> Option<PropertyKey>
pub const fn index(index: u32) -> Option<PropertyKey>
An immediate index key, for index < 2^31.
Sourcepub fn atom(id: StringId) -> PropertyKey
pub fn atom(id: StringId) -> PropertyKey
The key of an atom. Panics if the atom index does not fit (callers
allocate atoms below KEY_INDEX_LIMIT).
pub fn symbol(id: SymbolId) -> PropertyKey
pub const fn kind(self) -> KeyKind
pub const fn raw(self) -> u32
Sourcepub const fn from_raw(bits: u32) -> PropertyKey
pub const fn from_raw(bits: u32) -> PropertyKey
The key whose raw bits are bits: an instruction’s
imm field. Every bit pattern decodes to some key.
Sourcepub const fn to_value(self) -> Value
pub const fn to_value(self) -> Value
The key as a value: an Int32 for an index, else the string or symbol.
Sourcepub const fn heap_value(self) -> Option<Value>
pub const fn heap_value(self) -> Option<Value>
The heap value the key keeps alive, if any.
Trait Implementations§
Source§impl Clone for PropertyKey
impl Clone for PropertyKey
impl Copy for PropertyKey
Source§impl Debug for PropertyKey
impl Debug for PropertyKey
impl Eq for PropertyKey
Source§impl Hash for PropertyKey
impl Hash for PropertyKey
Source§impl Ord for PropertyKey
impl Ord for PropertyKey
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PropertyKey
impl PartialEq for PropertyKey
Source§impl PartialOrd for PropertyKey
impl PartialOrd for PropertyKey
impl StructuralPartialEq for PropertyKey
Auto Trait Implementations§
impl Freeze for PropertyKey
impl RefUnwindSafe for PropertyKey
impl Send for PropertyKey
impl Sync for PropertyKey
impl Unpin for PropertyKey
impl UnsafeUnpin for PropertyKey
impl UnwindSafe for PropertyKey
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