pub struct Handle<T: ?Sized> { /* private fields */ }Expand description
Handle to an asset.
Implementations§
Trait Implementations§
Source§impl<T> AssetHandle for Handle<T>
impl<T> AssetHandle for Handle<T>
Source§fn load_handle(&self) -> LoadHandle
fn load_handle(&self) -> LoadHandle
Returns the
LoadHandle of this asset handle.Source§fn load_status(&self, loader: &Loader) -> LoadStatus
fn load_status(&self, loader: &Loader) -> LoadStatus
Returns the load status of the asset. Read more
Source§fn asset<'a, T, S: TypedAssetStorage<T>>(&self, storage: &'a S) -> Option<&'a T>where
Self: Sized,
fn asset<'a, T, S: TypedAssetStorage<T>>(&self, storage: &'a S) -> Option<&'a T>where
Self: Sized,
Returns an immutable reference to the asset if it is committed. Read more
Source§fn asset_version<T, S: TypedAssetStorage<T>>(&self, storage: &S) -> Option<u32>where
Self: Sized,
fn asset_version<T, S: TypedAssetStorage<T>>(&self, storage: &S) -> Option<u32>where
Self: Sized,
Returns the version of the asset if it is committed. Read more
Source§fn asset_with_version<'a, T, S: TypedAssetStorage<T>>(
&self,
storage: &'a S,
) -> Option<(&'a T, u32)>where
Self: Sized,
fn asset_with_version<'a, T, S: TypedAssetStorage<T>>(
&self,
storage: &'a S,
) -> Option<(&'a T, u32)>where
Self: Sized,
Returns the asset with the given version if it is committed. Read more
Source§fn downgrade(&self) -> WeakHandle
fn downgrade(&self) -> WeakHandle
Downgrades this handle into a
WeakHandle. Read moreSource§impl<'de, T> Deserialize<'de> for Handle<T>
impl<'de, T> Deserialize<'de> for Handle<T>
Source§fn deserialize<D>(deserializer: D) -> Result<Handle<T>, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Handle<T>, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: ?Sized> From<GenericHandle> for Handle<T>
impl<T: ?Sized> From<GenericHandle> for Handle<T>
Source§fn from(handle: GenericHandle) -> Self
fn from(handle: GenericHandle) -> Self
Converts to this type from the input type.
impl<T: Eq + ?Sized> Eq for Handle<T>
Auto Trait Implementations§
impl<T> Freeze for Handle<T>where
T: ?Sized,
impl<T> RefUnwindSafe for Handle<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for Handle<T>
impl<T> Sync for Handle<T>
impl<T> Unpin for Handle<T>
impl<T> UnsafeUnpin for Handle<T>where
T: ?Sized,
impl<T> UnwindSafe for Handle<T>where
T: UnwindSafe + ?Sized,
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