pub struct UploadError {
pub source: Error,
pub partial: Option<ObjectHandle>,
}Expand description
Error from a high-level upload, carrying the handle of the object the device created during the first phase before the data phase failed.
Uploads are two-phase: the object is created (returning a handle), then the bytes are streamed.
If the data phase fails or is cancelled, the device may keep a partial (empty or truncated)
object. This surfaces that handle so the caller owns the cleanup-or-resume decision; the library
never auto-deletes it. (Backends differ: the WPD backend commits atomically, so partial is
None there.)
[From<UploadError> for Error] keeps ? ergonomic; callers drop partial
unless they match on UploadError explicitly.
Fields§
§source: ErrorThe underlying failure.
partial: Option<ObjectHandle>The handle of the partially-written object the device may still hold, if any.
Trait Implementations§
Source§impl Debug for UploadError
impl Debug for UploadError
Source§impl Display for UploadError
impl Display for UploadError
Source§impl Error for UploadError
impl Error for UploadError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()