pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Music<'static>, String> {
        let raw = unsafe {
            let c_path = CString::new(path.as_ref().to_str().unwrap()).unwrap();
            sys::mixer::Mix_LoadMUS(c_path.as_ptr())
        };
        if raw.is_null() {
            Err(get_error())
        } else {
            Ok(Music {
                raw: raw,
                owned: true,
                _marker: PhantomData,
            })
        }
    }
/// Load music file to use.
Load music file to use.
Load music file to use .
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Music<'static>, String> {
        let raw = unsafe {
            let c_path = CString::new(path.as_ref().to_str().unwrap()).unwrap();
            sys::mixer::Mix_LoadMUS(c_path.as_ptr())
        };
        if raw.is_null() {
            Err(get_error())
        } else {
            Ok(Music {
                raw: raw,
                owned: true,
                _marker: PhantomData,
            })
        }
    }
pub fn from_file < P : AsRef < Path > > ( path : P ) -> Result < Music < ' static > , String > { let raw = unsafe { let c_path = CString :: new ( path . as_ref ( ) . to_str ( ) . unwrap ( ) ) . unwrap ( ) ; sys :: mixer :: Mix_LoadMUS ( c_path . as_ptr ( ) ) } ; if raw . is_null ( ) { Err ( get_error ( ) ) } else { Ok ( Music { raw : raw , owned : true , _marker : PhantomData , } ) } }
Load music file to use.
Load music file to use .
path
P
path
P