[][src]Enum amethyst_assets::AssetPrefab

pub enum AssetPrefab<A, F = Box<dyn SerializableFormat<<A as Asset>::Data>>> where
    A: Asset,
    F: Format<A::Data>, 
{ Handle(Handle<A>), File(String, F), Placeholder, }

Convenience PrefabData for loading assets of type A using Format F.

Will add a Handle<A> to the Entity

Type parameters:

  • A: Asset,
  • F: Format for loading A

Variants

Handle(Handle<A>)

From existing handle

File(String, F)

From file, (name, format)

Placeholder

Placeholder during loading

Trait Implementations

impl<A: Clone, F: Clone> Clone for AssetPrefab<A, F> where
    A: Asset,
    F: Format<A::Data>, 
[src]

impl<A: Debug, F: Debug> Debug for AssetPrefab<A, F> where
    A: Asset,
    F: Format<A::Data>, 
[src]

impl<'de, A, F> Deserialize<'de> for AssetPrefab<A, F> where
    A: Asset,
    F: Format<A::Data>,
    F: Deserialize<'de>, 
[src]

impl<'a, A, F> PrefabData<'a> for AssetPrefab<A, F> where
    A: Asset,
    F: Format<A::Data>, 
[src]

type SystemData = (ReadExpect<'a, Loader>, WriteStorage<'a, Handle<A>>, Read<'a, AssetStorage<A>>)

SystemData needed to perform the load

type Result = Handle<A>

The result type returned by the load operation

impl<A, F> Serialize for AssetPrefab<A, F> where
    A: Asset,
    F: Format<A::Data>,
    F: Serialize
[src]

Auto Trait Implementations

impl<A, F> RefUnwindSafe for AssetPrefab<A, F> where
    A: RefUnwindSafe,
    F: RefUnwindSafe

impl<A, F> Send for AssetPrefab<A, F>

impl<A, F> Sync for AssetPrefab<A, F>

impl<A, F> Unpin for AssetPrefab<A, F> where
    A: Unpin,
    F: Unpin

impl<A, F> UnwindSafe for AssetPrefab<A, F> where
    A: UnwindSafe,
    F: 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> Clone for T where
    T: Clone
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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>,