[][src]Struct fetch_unroll::Save

pub struct Save<R> { /* fields omitted */ }

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]

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

impl<R> From<Result<R, Error>> for Save<R>[src]

Auto Trait Implementations

impl<R> !RefUnwindSafe for Save<R>[src]

impl<R> Send for Save<R> where
    R: Send
[src]

impl<R> Sync for Save<R> where
    R: Sync
[src]

impl<R> Unpin for Save<R> where
    R: Unpin
[src]

impl<R> !UnwindSafe for Save<R>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.