[−][src]Enum multipart::server::save::SaveResult
The ternary result type used for the SaveBuilder<_>
API.
Variants
The operation was a total success. Contained is the complete result.
Partial(Partial, PartialReason)
The operation quit partway through. Included is the partial result along with the reason.
Error(Error)
An error occurred at the start of the operation, before anything was done.
Implementations
impl<M: ReadEntry> SaveResult<Entries, PartialEntries<M>>
[src]
pub fn into_entries(self) -> Option<Entries>
[src]
Take the Entries
from self
, if applicable, and discarding
the error, if any.
impl<S, P> SaveResult<S, P> where
P: Into<S>,
[src]
P: Into<S>,
pub fn okish(self) -> Option<S>
[src]
Convert self
to Option<S>
; there may still have been an error.
pub fn map<T, Map>(self, map: Map) -> SaveResult<T, T> where
Map: FnOnce(S) -> T,
[src]
Map: FnOnce(S) -> T,
Map the Full
or Partial
values to a new type, retaining the reason
in the Partial
case.
pub fn into_opt_both(self) -> (Option<S>, Option<Error>)
[src]
Decompose self
to (Option<S>, Option<io::Error>)
pub fn into_result(self) -> Result<S>
[src]
Map self
to an io::Result
, discarding the error in the Partial
case.
pub fn into_result_strict(self) -> Result<S>
[src]
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> !RefUnwindSafe for SaveResult<Success, Partial>
[src]
impl<Success, Partial> Send for SaveResult<Success, Partial> where
Partial: Send,
Success: Send,
[src]
Partial: Send,
Success: Send,
impl<Success, Partial> Sync for SaveResult<Success, Partial> where
Partial: Sync,
Success: Sync,
[src]
Partial: Sync,
Success: Sync,
impl<Success, Partial> Unpin for SaveResult<Success, Partial> where
Partial: Unpin,
Success: Unpin,
[src]
Partial: Unpin,
Success: Unpin,
impl<Success, Partial> !UnwindSafe for SaveResult<Success, Partial>
[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> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,