pub fn compile(&self, filenames: &[&str]) -> Result<(), MagicError> {
        let cstring;
        let dbs = if filenames.len() == 0 {
            ptr::null()
        } else {
            cstring = CString::new(filenames.join(":")).map_err(|e| MagicError {
                desc: format!("{:?}", e),
            })?;
            cstring.as_ptr()
        };

        if unsafe { ffi::magic_compile(self.cookie, dbs) } == 0 {
            Ok(())
        } else {
            Err(self.magic_failure())
        }
    }
/// Compiles the given database `filenames` for faster access
///
/// The compiled files created are named from the `basename` of each file argument with '.mgc' appended to it.
Compiles the given database `filenames` for faster access
The compiled files created are named from the `basename` of each file argument with '.mgc' appended to it.
Compiles the given database ` filenames ` for faster access The compiled files created are named from the ` basename ` of each file argument with ' . mgc ' appended to it .
pub fn compile(&self, filenames: &[&str]) -> Result<(), MagicError> {
        let cstring;
        let dbs = if filenames.len() == 0 {
            ptr::null()
        } else {
            cstring = CString::new(filenames.join(":")).map_err(|e| MagicError {
                desc: format!("{:?}", e),
            })?;
            cstring.as_ptr()
        };
        if unsafe { ffi::magic_compile(self.cookie, dbs) } == 0 {
            Ok(())
        } else {
            Err(self.magic_failure())
        }
    }
pub fn compile ( & self , filenames : & [ & str ] ) -> Result < ( ) , MagicError > { let cstring ; let dbs = if filenames . len ( ) == 0 { ptr :: null ( ) } else { cstring = CString :: new ( filenames . join ( " " ) ) . map_err ( | e | MagicError { desc : format ! ( " " e ) , } ) ? ; cstring . as_ptr ( ) } ; if unsafe { ffi :: magic_compile ( self . cookie , dbs ) } == 0 { Ok ( ( ) ) } else { Err ( self . magic_failure ( ) ) } }
Compiles the given database `filenames` for faster access
The compiled files created are named from the `basename` of each file argument with '.mgc' appended to it.
Compiles the given database ` filenames ` for faster access The compiled files created are named from the ` basename ` of each file argument with ' . mgc ' appended to it .
&self
filenames
&[&str]