pub struct Converter { /* private fields */ }
Expand description
Converts a OMF1 files to OMF2.
This object allows you to set up the desired parameters then convert one or more files.
Implementations§
source§impl Converter
impl Converter
sourcepub fn set_limits(&mut self, limits: Limits)
pub fn set_limits(&mut self, limits: Limits)
Set the limits to use during conversion.
sourcepub fn compression(&self) -> Compression
pub fn compression(&self) -> Compression
Returns the current compression level.
sourcepub fn set_compression(&mut self, compression: Compression)
pub fn set_compression(&mut self, compression: Compression)
Set the compression level to use when writing.
sourcepub fn convert(&self, input: File, output: File) -> Result<Problems, Error>
pub fn convert(&self, input: File, output: File) -> Result<Problems, Error>
Runs a conversion from one open file to another file.
input
must support read and seek, while output
must support write.
On success the validation warnings are returned.
May be called more than once to convert multiple files with the same parameters.
sourcepub fn convert_open(
&self,
input_path: impl AsRef<Path>,
output_path: impl AsRef<Path>,
) -> Result<Problems, Error>
pub fn convert_open( &self, input_path: impl AsRef<Path>, output_path: impl AsRef<Path>, ) -> Result<Problems, Error>
Runs a conversion from one filename to another.
The output file will be created if it does not exist, and truncated if it does. On success the validation warnings are returned.
May be called more than once to convert multiple files with the same parameters.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Converter
impl RefUnwindSafe for Converter
impl Send for Converter
impl Sync for Converter
impl Unpin for Converter
impl UnwindSafe for Converter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more