pub enum TusError {
Show 27 variants
MissingTusResumable,
UnsupportedVersion {
version: String,
},
MissingUploadOffset,
OffsetMismatch {
expected: u64,
actual: u64,
},
WrongContentType(String),
NotFound(String),
Gone,
EntityTooLarge {
max: u64,
},
ExceedsUploadLength {
declared: u64,
end: u64,
},
ChecksumMismatch,
UnsupportedChecksumAlgorithm(String),
MissingUploadLength,
UploadLengthAlreadySet,
ExtensionNotEnabled(&'static str),
InvalidMetadata(String),
InvalidUploadId,
EmptyConcatenation,
PartialUploadIncomplete(String),
PatchOnFinalUpload,
UploadNotReadyForDownload,
MethodNotAllowed,
LockTimeout(String),
LockConflict(String),
HookRejected(String),
Io(Error),
Serialization(Error),
Internal(String),
}Variants§
MissingTusResumable
UnsupportedVersion
MissingUploadOffset
OffsetMismatch
WrongContentType(String)
NotFound(String)
Gone
EntityTooLarge
ExceedsUploadLength
ChecksumMismatch
UnsupportedChecksumAlgorithm(String)
MissingUploadLength
UploadLengthAlreadySet
ExtensionNotEnabled(&'static str)
InvalidMetadata(String)
InvalidUploadId
EmptyConcatenation
PartialUploadIncomplete(String)
PatchOnFinalUpload
UploadNotReadyForDownload
MethodNotAllowed
LockTimeout(String)
LockConflict(String)
HookRejected(String)
Io(Error)
Serialization(Error)
Internal(String)
Implementations§
Source§impl TusError
impl TusError
pub fn client_message(&self) -> String
Sourcepub fn status_code(&self) -> StatusCode
pub fn status_code(&self) -> StatusCode
Maps each variant to the appropriate HTTP status code per the tus 1.0.x spec.
Trait Implementations§
Source§impl Error for TusError
impl Error for TusError
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 Freeze for TusError
impl !RefUnwindSafe for TusError
impl Send for TusError
impl Sync for TusError
impl Unpin for TusError
impl UnsafeUnpin for TusError
impl !UnwindSafe for TusError
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