Skip to main content

AssetSource

Trait AssetSource 

Source
pub trait AssetSource:
    'static
    + Send
    + Sync {
    type Processed: 'static + Send + Sync;
}
Expand description

Declares the processed form of a source asset type.

Implement this alongside Asset<B> for every source type that is uploaded to a backend. Used as the storage bound for Assets<T> — the struct that holds both T (source) and T::Processed (uploaded result) per entry.

Kept separate from Asset<B> so that Assets<T> does not need to know the backend type B.

Required Associated Types§

Source

type Processed: 'static + Send + Sync

The uploaded (GPU/processed) form produced by Asset::upload.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§