pub struct Extract<'a> { /* private fields */ }
Expand description
The extract manager.
Implementations§
Source§impl<'a> Extract<'a>
impl<'a> Extract<'a>
Sourcepub fn from_source(source: &'a Path) -> Extract<'a>
pub fn from_source(source: &'a Path) -> Extract<'a>
Create an `Extractor from a source path
Sourcepub fn archive_format(&mut self, format: ArchiveFormat) -> &mut Self
pub fn archive_format(&mut self, format: ArchiveFormat) -> &mut Self
Specify an archive format of the source being extracted. If not specified, the archive format will determined from the file extension.
Sourcepub fn extract_into(&self, into_dir: &Path) -> Result<()>
pub fn extract_into(&self, into_dir: &Path) -> Result<()>
Extract an entire source archive into a specified path. If the source is a single compressed
file and not an archive, it will be extracted into a file with the same name inside of
into_dir
.
Sourcepub fn extract_file<T: AsRef<Path>>(
&self,
into_dir: &Path,
file_to_extract: T,
) -> Result<()>
pub fn extract_file<T: AsRef<Path>>( &self, into_dir: &Path, file_to_extract: T, ) -> Result<()>
Extract a single file from a source and save to a file of the same name in into_dir
.
If the source is a single compressed file, it will be saved with the name file_to_extract
in the specified into_dir
.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Extract<'a>
impl<'a> RefUnwindSafe for Extract<'a>
impl<'a> Send for Extract<'a>
impl<'a> Sync for Extract<'a>
impl<'a> Unpin for Extract<'a>
impl<'a> UnwindSafe for Extract<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more