pub fn buffer(&self, buf: &[u8]) -> Result<String, MagicError> {
        let buffer_len = buf.len() as size_t;
        let pbuffer = buf.as_ptr();
        let s = unsafe { ffi::magic_buffer(self.cookie, pbuffer, buffer_len) };
        if s.is_null() {
            Err(self.magic_failure())
        } else {
            Ok(from_c_str_unsafe!(s))
        }
    }
/// Returns a textual description of the contents of the `buffer`
Returns a textual description of the contents of the `buffer`
Returns a textual description of the contents of the ` buffer `
pub fn buffer(&self, buf: &[u8]) -> Result<String, MagicError> {
        let buffer_len = buf.len() as size_t;
        let pbuffer = buf.as_ptr();
        let s = unsafe { ffi::magic_buffer(self.cookie, pbuffer, buffer_len) };
        if s.is_null() {
            Err(self.magic_failure())
        } else {
            Ok(from_c_str_unsafe!(s))
        }
    }
pub fn buffer ( & self , buf : & [ u8 ] ) -> Result < String , MagicError > { let buffer_len = buf . len ( ) as size_t ; let pbuffer = buf . as_ptr ( ) ; let s = unsafe { ffi :: magic_buffer ( self . cookie , pbuffer , buffer_len ) } ; if s . is_null ( ) { Err ( self . magic_failure ( ) ) } else { Ok ( from_c_str_unsafe ! ( s ) ) } }
Returns a textual description of the contents of the `buffer`
Returns a textual description of the contents of the ` buffer `
&self
buf
&[u8]