Struct epub_builder::ZipCommand
source · pub struct ZipCommand { /* private fields */ }
Expand description
Zip files using the system zip
command.
Create a temporary directory, write temp files in that directory, and then calls the zip command to generate an epub file.
This method will fail if zip
(or the alternate specified command) is not installed
on the user system.
Note that these takes care of adding the mimetype (since it must not be deflated), it should not be added manually.
Implementations§
source§impl ZipCommand
impl ZipCommand
sourcepub fn new() -> Result<ZipCommand>
pub fn new() -> Result<ZipCommand>
Creates a new ZipCommand, using default setting to create a temporary directory.
sourcepub fn new_in<P: AsRef<Path>>(temp_path: P) -> Result<ZipCommand>
pub fn new_in<P: AsRef<Path>>(temp_path: P) -> Result<ZipCommand>
Creates a new ZipCommand, specifying where to create a temporary directory.
Arguments
temp_path
: the path where a temporary directory should be created.
Auto Trait Implementations§
impl RefUnwindSafe for ZipCommand
impl Send for ZipCommand
impl Sync for ZipCommand
impl Unpin for ZipCommand
impl UnwindSafe for ZipCommand
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