Struct distill_loader::handle::WeakHandle [−][src]
Handle to an asset that does not prevent the asset from being unloaded.
Weak handles are primarily used when you want to use something that is already loaded.
For example, a strong handle to an asset may be guaranteed to exist elsewhere in the program, and so you can simply get and use a weak handle to that asset in other parts of your code. This removes reference counting overhead, but also ensures that the system which uses the weak handle is not in control of when to unload the asset.
Implementations
impl WeakHandle
[src]
pub fn new(handle: LoadHandle) -> Self
[src]
Trait Implementations
impl AssetHandle for WeakHandle
[src]
fn load_handle(&self) -> LoadHandle
[src]
fn load_status(&self, loader: &Loader) -> LoadStatus
[src]
fn asset<'a, T, S: TypedAssetStorage<T>>(&self, storage: &'a S) -> Option<&'a T> where
Self: Sized,
[src]
Self: Sized,
fn asset_version<T, S: TypedAssetStorage<T>>(&self, storage: &S) -> Option<u32> where
Self: Sized,
[src]
Self: Sized,
fn asset_with_version<'a, T, S: TypedAssetStorage<T>>(
&self,
storage: &'a S
) -> Option<(&'a T, u32)> where
Self: Sized,
[src]
&self,
storage: &'a S
) -> Option<(&'a T, u32)> where
Self: Sized,
fn downgrade(&self) -> WeakHandle
[src]
impl Clone for WeakHandle
[src]
fn clone(&self) -> WeakHandle
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for WeakHandle
[src]
impl Eq for WeakHandle
[src]
impl Hash for WeakHandle
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<WeakHandle> for WeakHandle
[src]
fn eq(&self, other: &WeakHandle) -> bool
[src]
fn ne(&self, other: &WeakHandle) -> bool
[src]
impl StructuralEq for WeakHandle
[src]
impl StructuralPartialEq for WeakHandle
[src]
Auto Trait Implementations
impl RefUnwindSafe for WeakHandle
impl Send for WeakHandle
impl Sync for WeakHandle
impl Unpin for WeakHandle
impl UnwindSafe for WeakHandle
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,