pub struct IAssetRef<T> { /* private fields */ }
Expand description
A non-owning pointer to a native object.
Implementations§
Source§impl<T> IAssetRef<T>
impl<T> IAssetRef<T>
Sourcepub fn from_raw(asset: *mut som_asset_t) -> Self
pub fn from_raw(asset: *mut som_asset_t) -> Self
Construct from a raw pointer, incrementing the reference count.
Sourcepub fn into_raw(asset: IAssetRef<T>) -> *mut som_asset_t
pub fn into_raw(asset: IAssetRef<T>) -> *mut som_asset_t
Return the raw pointer, releasing the reference count.
Sourcepub fn as_ptr(&self) -> *mut som_asset_t
pub fn as_ptr(&self) -> *mut som_asset_t
Get the underlaying pointer.
Sourcepub fn as_asset(&self) -> &som_asset_t
pub fn as_asset(&self) -> &som_asset_t
Get a reference to the underlaying pointer.
Sourcepub fn get_passport(&self) -> &som_passport_t
pub fn get_passport(&self) -> &som_passport_t
Get the passport of the asset.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for IAssetRef<T>
impl<T> RefUnwindSafe for IAssetRef<T>where
T: RefUnwindSafe,
impl<T> !Send for IAssetRef<T>
impl<T> !Sync for IAssetRef<T>
impl<T> Unpin for IAssetRef<T>where
T: Unpin,
impl<T> UnwindSafe for IAssetRef<T>where
T: UnwindSafe,
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