Trait LoadableResource

Source
pub trait LoadableResource {
    type ResourceType;
    type Error;
    type Options;

    // Required method
    fn load(
        path: &Path,
        options: Self::Options,
    ) -> Result<Self::ResourceType, Self::Error>;
}
Expand description

Trait for a resource that is loadable from disk.

Required Associated Types§

Source

type ResourceType

The type of the resource.

Source

type Error

The error type when loading the resource.

Source

type Options

The type of options to pass to the loader.

Required Methods§

Source

fn load( path: &Path, options: Self::Options, ) -> Result<Self::ResourceType, Self::Error>

Load the resource from the path.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl LoadableResource for PassMeta

Source§

impl LoadableResource for TextureMeta

Implementors§