Trait ResourceLoader

Source
pub trait ResourceLoader<'l, TResult> {
    type Args: ?Sized;

    // Required method
    fn load(&'l self, data: &Self::Args) -> Result<TResult, String>;
}

Required Associated Types§

Required Methods§

Source

fn load(&'l self, data: &Self::Args) -> Result<TResult, String>

Implementations on Foreign Types§

Source§

impl<'l> ResourceLoader<'l, Font<'l, 'static>> for Sdl2TtfContext

Source§

type Args = FontDetails

Source§

fn load(&'l self, details: &FontDetails) -> Result<Font<'l, 'static>, String>

Source§

impl<'l, T> ResourceLoader<'l, Texture<'l>> for TextureCreator<T>

Source§

type Args = str

Source§

fn load(&'l self, path: &str) -> Result<Texture<'_>, String>

Implementors§