#[non_exhaustive]pub enum ChunkedUploadError {
Io(Error),
SessionNotFound(String),
InvalidChunk {
expected: usize,
actual: usize,
},
ChunkOutOfOrder {
expected: usize,
actual: usize,
},
AlreadyCompleted,
ChecksumMismatch,
DuplicateChunk {
chunk_number: usize,
},
}Expand description
Errors that can occur during chunked upload
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io(Error)
An I/O error occurred during chunk processing.
SessionNotFound(String)
The upload session with the given ID was not found.
InvalidChunk
The received chunk size does not match the expected size.
Fields
ChunkOutOfOrder
Chunks were received out of sequential order.
AlreadyCompleted
The upload session has already been completed.
ChecksumMismatch
The assembled file checksum does not match the expected value.
DuplicateChunk
A chunk with the same number has already been uploaded.
Trait Implementations§
Source§impl Debug for ChunkedUploadError
impl Debug for ChunkedUploadError
Source§impl Display for ChunkedUploadError
impl Display for ChunkedUploadError
Source§impl Error for ChunkedUploadError
impl Error for ChunkedUploadError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for ChunkedUploadError
impl !UnwindSafe for ChunkedUploadError
impl Freeze for ChunkedUploadError
impl Send for ChunkedUploadError
impl Sync for ChunkedUploadError
impl Unpin for ChunkedUploadError
impl UnsafeUnpin for ChunkedUploadError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more