[−][src]Struct fetch_unroll::Unroll
Archive unroller
NOTE: Currently supported .tar.gz archives only.
Implementations
impl<R> Unroll<R>
[src]
pub const fn create_dest_path(self, flag: bool) -> Self
[src]
Create destination directory when it doesn't exists
Default: true
pub const fn cleanup_dest_dir(self, flag: bool) -> Self
[src]
Cleanup destination directory before extraction
Default: true
pub const fn fix_invalid_dest(self, flag: bool) -> Self
[src]
Try to fix destination path when it is not a valid
For example, when destination already exists and it is not a directory, it will be removed
Default: true
pub const fn cleanup_on_error(self, flag: bool) -> Self
[src]
Cleanup already extracted data when errors occurs
Default: true
pub const fn strip_components(self, num_of_components: usize) -> Self
[src]
Strip the number of leading components from file names on extraction
Default: 0
pub const fn strip_when_alone(self, flag: bool) -> Self
[src]
Strip the leading components only when it's alone
Default: false
impl<R> Unroll<R>
[src]
pub fn to<D>(self, path: D) -> Status where
R: Read,
D: AsRef<Path>,
[src]
R: Read,
D: AsRef<Path>,
Extract contents to specified directory
Errors
- Destination directory does not exists when
create_dest_path
is not set - Destination directory is not empty when
cleanup_dest_dir
is not set - Destination path is not a directory when
fix_invalid_dest
is not set - Required number of path components cannot be stripped when
strip_when_alone
is not set
Trait Implementations
Auto Trait Implementations
impl<R> !RefUnwindSafe for Unroll<R>
[src]
impl<R> Send for Unroll<R> where
R: Send,
[src]
R: Send,
impl<R> Sync for Unroll<R> where
R: Sync,
[src]
R: Sync,
impl<R> Unpin for Unroll<R> where
R: Unpin,
[src]
R: Unpin,
impl<R> !UnwindSafe for Unroll<R>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,