pub struct Key(/* private fields */);Expand description
A reference-counted handle to a keyed object.
This is the primary way objects reference each other in the Plasma engine. A null key (None) represents a nil reference.
Implementations§
Source§impl Key
impl Key
Sourcepub fn from_uoid_with_pos(uoid: Uoid, start_pos: u32, data_len: u32) -> Self
pub fn from_uoid_with_pos(uoid: Uoid, start_pos: u32, data_len: u32) -> Self
Create a key with file position info (for demand loading).
Sourcepub fn inner(&self) -> Option<&Arc<RwLock<KeyData>>>
pub fn inner(&self) -> Option<&Arc<RwLock<KeyData>>>
Get the inner Arc for this key. Returns None for null keys.
Sourcepub fn class_type(&self) -> u16
pub fn class_type(&self) -> u16
Get the class type of the referenced object. Panics on null keys.
Trait Implementations§
Source§impl Ord for Key
impl Ord for Key
Source§impl PartialOrd for Key
impl PartialOrd for Key
impl Eq for Key
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnsafeUnpin for Key
impl UnwindSafe for Key
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