Struct bevy::asset::Handle[]

pub struct Handle<T> where
    T: Asset
{ pub id: HandleId, // some fields omitted }

A handle into a specific Asset of type T

Handles contain a unique id that corresponds to a specific asset in the Assets collection.

Fields

id: HandleId

Implementations

impl<T> Handle<T> where
    T: Asset

pub fn weak(id: HandleId) -> Handle<T>

pub fn as_weak<U>(&self) -> Handle<U> where
    U: Asset

pub fn is_weak(&self) -> bool

pub fn is_strong(&self) -> bool

pub fn make_strong(&mut self, assets: &mut Assets<T>)

pub fn clone_weak(&self) -> Handle<T>

pub fn clone_untyped(&self) -> HandleUntyped

pub fn clone_weak_untyped(&self) -> HandleUntyped

Trait Implementations

impl<T> Clone for Handle<T> where
    T: Asset

impl<T> Debug for Handle<T> where
    T: Asset

impl<T> Default for Handle<T> where
    T: Asset

impl<T> Drop for Handle<T> where
    T: Asset

impl<T> Eq for Handle<T> where
    T: Asset

impl<'_, T> From<&'_ Handle<T>> for HandleId where
    T: Asset

impl<T> From<Handle<T>> for HandleId where
    T: Asset

impl From<Handle<Texture>> for StandardMaterial

impl From<Handle<Texture>> for ColorMaterial

impl<T> GetTypeRegistration for Handle<T> where
    T: Asset

impl<T> Hash for Handle<T> where
    T: Asset

impl<T> Ord for Handle<T> where
    T: Asset

impl<T> PartialEq<Handle<T>> for Handle<T> where
    T: Asset

impl<T> PartialOrd<Handle<T>> for Handle<T> where
    T: Asset

impl<T> Reflect for Handle<T> where
    T: Asset

impl RenderResource for Handle<Texture>

impl<T> Send for Handle<T> where
    T: Asset

impl<T> Struct for Handle<T> where
    T: Asset

impl<T> Sync for Handle<T> where
    T: Asset

Auto Trait Implementations

impl<T> RefUnwindSafe for Handle<T> where
    T: RefUnwindSafe

impl<T> Unpin for Handle<T> where
    T: Unpin

impl<T> UnwindSafe for Handle<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CallHasher for T where
    T: Hash + ?Sized

impl<T> CallHasher for T where
    T: Hash

impl<T> CloneAny for T where
    T: Any + Clone

impl<T> Component for T where
    T: 'static + Send + Sync

impl<T> Downcast for T where
    T: Any

impl<T> Downcast<T> for T

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> DynEq for T where
    T: Any + Eq

impl<T> DynHash for T where
    T: DynEq + Hash

impl<Q, K> Equivalent<K> for Q where
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FromWorld for T where
    T: Default

impl<S> GetField for S where
    S: Struct

impl<T> GetPath for T where
    T: Reflect

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> TypeData for T where
    T: 'static + Send + Sync + Clone

impl<T> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,