Skip to main content

BinaryOperations

Trait BinaryOperations 

Source
pub trait BinaryOperations {
    // Required methods
    fn read_binary<P: AsRef<Path>>(
        &self,
        path: P,
        tag: BinaryTag,
    ) -> Result<Vec<u8>>;
    fn write_binary<P: AsRef<Path>>(&self, path: P) -> BinaryWriteBuilder<'_>;
    fn extract_thumbnail<P: AsRef<Path>, Q: AsRef<Path>>(
        &self,
        source: P,
        dest: Q,
    ) -> Result<()>;
    fn extract_preview<P: AsRef<Path>, Q: AsRef<Path>>(
        &self,
        source: P,
        dest: Q,
    ) -> Result<()>;
}
Expand description

扩展 ExifTool 以支持二进制操作

Required Methods§

Source

fn read_binary<P: AsRef<Path>>( &self, path: P, tag: BinaryTag, ) -> Result<Vec<u8>>

读取二进制数据

Source

fn write_binary<P: AsRef<Path>>(&self, path: P) -> BinaryWriteBuilder<'_>

写入二进制数据

Source

fn extract_thumbnail<P: AsRef<Path>, Q: AsRef<Path>>( &self, source: P, dest: Q, ) -> Result<()>

提取缩略图到文件

Source

fn extract_preview<P: AsRef<Path>, Q: AsRef<Path>>( &self, source: P, dest: Q, ) -> Result<()>

提取预览图到文件

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§