[][src]Struct bevy_asset::Handle

pub struct Handle<T> where
    T: 'static, 
{ 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>[src]

pub fn new() -> Self[src]

pub fn as_handle<U>(&self) -> Handle<U>[src]

Gets a handle for the given type that has this handle's id. This is useful when an asset is derived from another asset. In this case, a common handle can be used to correlate them. NOTE: This pattern might eventually be replaced by a more formal asset dependency system.

pub const fn from_id(id: HandleId) -> Self[src]

pub const fn from_u128(value: u128) -> Self[src]

pub const fn from_bytes(bytes: [u8; 16]) -> Self[src]

pub fn from_untyped(untyped_handle: HandleUntyped) -> Option<Handle<T>> where
    T: 'static, 
[src]

Trait Implementations

impl<T> Clone for Handle<T>[src]

impl<T> Copy for Handle<T>[src]

impl<T> Debug for Handle<T>[src]

impl<T> Default for Handle<T>[src]

impl<T> DeserializeProperty for Handle<T>[src]

impl<T> Eq for Handle<T>[src]

impl<T> From<[u8; 16]> for Handle<T>[src]

impl<T> From<Handle<T>> for HandleUntyped where
    T: 'static, 
[src]

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

impl<T> From<HandleUntyped> for Handle<T> where
    T: 'static, 
[src]

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

impl<T> Hash for Handle<T>[src]

impl<T> PartialEq<Handle<T>> for Handle<T>[src]

impl<T> Properties for Handle<T>[src]

impl<T> Property for Handle<T>[src]

impl<T> Send for Handle<T>[src]

impl<T> Sync for Handle<T>[src]

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> CloneAny for T where
    T: Clone + Any

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

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

impl<T> FromResources for T where
    T: Default
[src]

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

impl<P> PropertiesVal for P where
    P: Properties
[src]

impl<T> Resource for T where
    T: 'static + Send + Sync
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,