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: shader.rs
    path of file: ./repos/unrust/src/engine/asset/loader
    
    the code of the file until where you have to start completion: use engine::asset::loader::{Loadable, Loader};
use engine::asset::{AssetError, AssetResult, AssetSystem, File, FileFuture};
use engine::render::{PreprocessedShaderCode, Shader, ShaderKind, ShaderKindFs, ShaderKindProvider,
                     ShaderKindVs};

use std::str;
use std::marker::PhantomData;
use futures::Future;
use futures::{future, Async};
use std::collections::HashMap;

use uni_glsl::preprocessor::PreprocessError;

pub struct ShaderLoader<T: ShaderKindProvider> {
    phantom: PhantomData<T>,
}

impl<T> Loader<Shader<T>> for ShaderLoader<T>
where
    T: ShaderKindProvider,
{
    fn load<A>(_asys: A, mut file: Box<File>) -> AssetResult<Shader<T>> {
        let buf = file.read_binary()
            .map_err(|_| AssetError::ReadBufferFail(file.name()))?;
        let s = str::from_utf8(&buf).map_err(|e| AssetError::InvalidFormat {
            path: file.name(),
            len: buf.len(),
          
    
    fn update_externs(&mut self) -> Result<(), PreprocessError> {
        let old: Vec<_> = self.loading_files.drain().collect();

        for (k, mut v) in old {
            let r = v.poll();

            match r {
                Ok(Async::NotReady) => {
                    self.loading_files.insert(k, v);
                }
                Ok(Async::Ready(mut f)) => {
                    let buf = f.read_binary().map_err(|e| {
                        PreprocessError::MissingFile(format!(
                            "Cannot read buffer for extern file: {}, reason: {:?}",
                            f.name().clone(),
                            e
                        ))
                    })?;

                    let s = str::from_utf8(&buf).map_err(|e| {
                        PreprocessError::ParseError(format!(
                            "Cannot parse as string for extern file: {}, reason: {:?}",
                            self.filename, e
                        ))
                    })?;

                    self.extern_files.insert(k, s.to_owned());
                }
                Err(e) => {
                    return Err(PreprocessError::MissingFile(format!(
                        "Cannot open extern file: {}, reason: {:?}",
                        k, e
                    )));
                }
            }
        }

        Ok(())
    }