Skip to main content

LoadFromPath

Trait LoadFromPath 

Source
pub trait LoadFromPath {
    // Required method
    fn load_from_path_erased(
        &mut self,
        type_id: TypeId,
        path: AssetPath<'static>,
    ) -> UntypedHandle;
}
Expand description

A trait for loading an asset.

There are several ways to load an asset. This trait allows deserializing in many contexts depending on how assets can be loaded. Note all these loads are deferred, and must have a concrete type.

Required Methods§

Source

fn load_from_path_erased( &mut self, type_id: TypeId, path: AssetPath<'static>, ) -> UntypedHandle

Initiates the load for the given expected type ID, and the path.

See LoadBuilder::load_erased for more.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§