pub struct IAssetRef<T> { /* private fields */ }
Expand description
A non-owning pointer to a native object.
Implementations
sourceimpl<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> 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more