[][src]Enum multipart::server::save::SaveResult

pub enum SaveResult<Success, Partial> {
    Full(Success),
    Partial(Partial, PartialReason),
    Error(Error),
}

The ternary result type used for the SaveBuilder<_> API.

Variants

The operation was a total success. Contained is the complete result.

The operation quit partway through. Included is the partial result along with the reason.

An error occurred at the start of the operation, before anything was done.

Methods

impl<S, P> SaveResult<S, P> where
    P: Into<S>, 
[src]

Convert self to Option<S>; there may still have been an error.

Map the Full or Partial values to a new type, retaining the reason in the Partial case.

Decompose self to (Option<S>, Option<io::Error>)

Map self to an io::Result, discarding the error in the Partial case.

Pessimistic version of into_result() which will return an error even for the Partial case.

Note: Possible Storage Leak

It's generally not a good idea to ignore the Partial case, as there may still be a partially written file on-disk. If you're not using a temporary directory (OS-managed or via TempDir) then partially written files will remain on-disk until explicitly removed which could result in excessive disk usage if not monitored closely.

Trait Implementations

impl<Success: Debug, Partial: Debug> Debug for SaveResult<Success, Partial>
[src]

Auto Trait Implementations

impl<Success, Partial> Send for SaveResult<Success, Partial> where
    Partial: Send,
    Success: Send

impl<Success, Partial> Sync for SaveResult<Success, Partial> where
    Partial: Sync,
    Success: Sync

Blanket Implementations

impl<T> From for T
[src]

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> Typeable for T where
    T: Any

Get the TypeId of this object.

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> UnsafeAny for T where
    T: Any