pub struct ObjectRefHandle(/* private fields */);
Expand description
Strongly-typed handle to an object.
Use get
or as_ref
to access the underlying object.
Implementations§
Source§impl ObjectRefHandle
impl ObjectRefHandle
Sourcepub const fn from_handle(handle: BSUntypedPointerHandle) -> Self
pub const fn from_handle(handle: BSUntypedPointerHandle) -> Self
Creates a typed handle from an untyped handle.
Source§impl ObjectRefHandle
impl ObjectRefHandle
Sourcepub fn get(&self) -> NiPointer<TESObjectREFR>
pub fn get(&self) -> NiPointer<TESObjectREFR>
Retrieves a smart pointer to the underlying object.
Sourcepub fn as_ref(&self) -> Option<&TESObjectREFR>
pub fn as_ref(&self) -> Option<&TESObjectREFR>
Attempts to get a shared reference to the object.
Trait Implementations§
Source§impl Clone for ObjectRefHandle
impl Clone for ObjectRefHandle
Source§fn clone(&self) -> ObjectRefHandle
fn clone(&self) -> ObjectRefHandle
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 ObjectRefHandle
impl Debug for ObjectRefHandle
Source§impl Default for ObjectRefHandle
impl Default for ObjectRefHandle
Source§fn default() -> ObjectRefHandle
fn default() -> ObjectRefHandle
Returns the “default value” for a type. Read more
Source§impl From<BSPointerHandle<TESObjectREFR>> for ObjectRefHandle
impl From<BSPointerHandle<TESObjectREFR>> for ObjectRefHandle
Source§fn from(inner: BSPointerHandle<TESObjectREFR>) -> Self
fn from(inner: BSPointerHandle<TESObjectREFR>) -> Self
Converts to this type from the input type.
Source§impl From<ObjectRefHandle> for BSPointerHandle<TESObjectREFR>
impl From<ObjectRefHandle> for BSPointerHandle<TESObjectREFR>
Source§fn from(wrapper: ObjectRefHandle) -> Self
fn from(wrapper: ObjectRefHandle) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ObjectRefHandle
impl PartialEq for ObjectRefHandle
impl StructuralPartialEq for ObjectRefHandle
impl Zeroable for ObjectRefHandle
Auto Trait Implementations§
impl Freeze for ObjectRefHandle
impl RefUnwindSafe for ObjectRefHandle
impl !Send for ObjectRefHandle
impl !Sync for ObjectRefHandle
impl Unpin for ObjectRefHandle
impl UnwindSafe for ObjectRefHandle
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