pub struct AssetHandle<T: Asset> { /* private fields */ }Expand description
A strong handle that keeps the underlying asset alive.
Dropping the last AssetHandle for a given asset does not automatically
unload the asset — the AssetCache decides eviction — but it signals
to the server that no live code holds a reference.
Cloning an AssetHandle is cheap: it increments an Arc reference count.
Implementations§
Trait Implementations§
Source§impl<T: Asset> Clone for AssetHandle<T>
impl<T: Asset> Clone for AssetHandle<T>
Source§impl<T: Asset> PartialEq for AssetHandle<T>
impl<T: Asset> PartialEq for AssetHandle<T>
impl<T: Asset> Eq for AssetHandle<T>
Auto Trait Implementations§
impl<T> Freeze for AssetHandle<T>
impl<T> RefUnwindSafe for AssetHandle<T>
impl<T> Send for AssetHandle<T>
impl<T> Sync for AssetHandle<T>
impl<T> Unpin for AssetHandle<T>
impl<T> UnsafeUnpin for AssetHandle<T>
impl<T> UnwindSafe for AssetHandle<T>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.