[−][src]Struct fetch_unroll::Save
File writer
Implementations
impl<R> Save<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 force_overwrite(self, flag: bool) -> Self
[src]
Overwrite existing file
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 a directory, it will be removed
Default: true
pub const fn cleanup_on_error(self, flag: bool) -> Self
[src]
Cleanup already written data when errors occurs
Default: true
impl<R> Save<R>
[src]
pub fn to<D>(self, path: D) -> Status where
R: Read,
D: AsRef<Path>,
[src]
R: Read,
D: AsRef<Path>,
Save file to specified path
Errors
- Destination directory does not exists when
create_dest_path
is not set - File already exist at destination directory when
force_overwrite
is not set - Destination path is not a file when
fix_invalid_dest
is not set
Trait Implementations
Auto Trait Implementations
impl<R> !RefUnwindSafe for Save<R>
[src]
impl<R> Send for Save<R> where
R: Send,
[src]
R: Send,
impl<R> Sync for Save<R> where
R: Sync,
[src]
R: Sync,
impl<R> Unpin for Save<R> where
R: Unpin,
[src]
R: Unpin,
impl<R> !UnwindSafe for Save<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>,