/// Parse from a directory specified by the path.
///
/// For now, the osu parser is assumed (TODO).
Parse from a directory specified by the path.
For now, the osu parser is assumed (TODO).
Parse from a directory specified by the path . For now the osu parser is assumed ( TODO ) .
pub fn from_path<G, F>(
    factory: &mut F,
    skin_entry: &config::SkinEntry,
    config: &config::Config,
) -> Result<Box<dyn GameSkin<G>>, ParseError>
where
    G: Graphics + 'static,
    G::Texture: CreateTexture<F>,
    <G::Texture as TextureOp<F>>::Error: ToString,
{
    match skin_entry {
        config::SkinEntry::Osu(p) =>
            osu_skin::from_path(factory, p, &config.game.default_osu_skin_path),
        config::SkinEntry::O2Jam(_p) => unimplemented!(),
    }
}
pub fn from_path < G , F > ( factory : & mut F , skin_entry : & config :: SkinEntry , config : & config :: Config , ) -> Result < Box < dyn GameSkin < G > > , ParseError > where G : Graphics + ' static , G :: Texture : CreateTexture < F > , < G :: Texture as TextureOp < F > > :: Error : ToString , { match skin_entry { config :: SkinEntry :: Osu ( p ) => osu_skin :: from_path ( factory , p , & config . game . default_osu_skin_path ) , config :: SkinEntry :: O2Jam ( _p ) => unimplemented ! ( ) , } }
Parse from a directory specified by the path.
Parse from a directory specified by the path .
factory
&mut F
skin_entry
&config::SkinEntry
config
&config::Config