pub trait ResourceLoader: Send + Sync {
    fn name(&self) -> Cow<'_, str>;
    fn try_load(
        &self,
        path: &Path,
        reader: &mut dyn Read
    ) -> Result<Option<(String, Arc<dyn Resource + 'static>)>, Error>; fn into_boxed(self) -> Box<dyn ResourceLoader + 'static, Global>Notable traits for Box<R, Global>impl<R> Read for Box<R, Global>where
    R: Read + ?Sized,
impl<W> Write for Box<W, Global>where
    W: Write + ?Sized,
impl<I, A> Iterator for Box<I, A>where
    I: Iterator + ?Sized,
    A: Allocator,
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A>where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static,
type Output = <F as Future>::Output;

    where
        Self: 'static + Sized
, { ... } }

Required Methods

Name of the resource loader.

Try to load a resource give a path and its corresponding reader. None is returned if the path is not accepted by this loader.

Provided Methods

Implementors