#[non_exhaustive]pub enum ReadErrorKind<B, S> {
InvalidMediaType,
ContentTooLarge {
length: u64,
limit: u64,
},
Rejected(Rejection),
Body(B),
Store(S),
}Expand description
The kind of ReadError, where B is the body’s error and S the UploadStore’s.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidMediaType
The request has more than one Content-Type field, or one that is not a valid media type. The body was not read. 400 Bad Request.
ContentTooLarge
The request’s length exceeds the largest body the declaration could need in its format. The body was not read. 413 Content Too Large.
Fields
limit: u64The largest body the declaration could need, Content::body_size_limit.
Rejected(Rejection)
The content was refused: a fatal error, whose own status is 400, 413, or 415, or violations, which are 422 Unprocessable Content.
Body(B)
Reading the request’s body failed, including when its read was cancelled. 400 Bad Request, although after cancellation, such as when the server is shutting down, there is usually no one to respond to.
Store(S)
Storing an upload failed, including when a store operation was cancelled. 500 Internal Server Error.