You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: loader.rs
    path of file: ./repos/notan/crates/notan_app/src/assets
    
    the code of the file until where you have to start completion: #![allow(clippy::wrong_self_convention, non_snake_case, clippy::type_complexity)]

use super::manager::Assets;
use super::storage::AssetStorage;
use crate::app::App;
use crate::graphics::Graphics;
use crate::plugins::Plugins;

use std::any::TypeId;
use std::rc::Rc;

pub(crate) type LoaderParams<'a, S> = (&'
    
    pub(crate) fn apply(self, manager: &mut Assets) -> Result<(), String> {
        let AssetLoader {
            extensions,
            parser,
            type_id,
        } = self;

        if extensions.is_empty() {
            return Err("Loader without extensions associated.".to_string());
        }

        let type_id =
            type_id.ok_or_else(|| "Loader without output type associated.".to_string())?;
        let mut parser = parser.ok_or_else(|| "Loader without parser associated.".to_string())?;
        parser.set_type_id(type_id);

        extensions.iter().for_each(|ext| {
            manager.loaders.insert(ext.to_string(), parser.clone());
        });

        Ok(())
    }