pub enum ResponseConstructionError {
InvalidStatus(u16),
InvalidHeader(HeaderError),
ForbiddenFramingHeader(String),
BodyAlreadyConsumed,
ContentLengthMismatch {
declared: u64,
actual: u64,
},
FileStreamLimit,
}Expand description
Errors from response construction.
Variants§
InvalidStatus(u16)
The status code is outside the valid 100–599 range.
InvalidHeader(HeaderError)
A header name or value failed validation.
ForbiddenFramingHeader(String)
A framing header (Transfer-Encoding, Content-Length) was provided by the handler and must be removed or rejected.
BodyAlreadyConsumed
The response body was already consumed.
ContentLengthMismatch
The content-length header does not match the actual body length.
FileStreamLimit
No file-stream admission permit was available.
Trait Implementations§
Source§impl Clone for ResponseConstructionError
impl Clone for ResponseConstructionError
Source§fn clone(&self) -> ResponseConstructionError
fn clone(&self) -> ResponseConstructionError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResponseConstructionError
impl Debug for ResponseConstructionError
Source§impl Display for ResponseConstructionError
impl Display for ResponseConstructionError
impl Eq for ResponseConstructionError
Source§impl Error for ResponseConstructionError
impl Error for ResponseConstructionError
1.30.0 · 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()
Source§impl From<HeaderError> for ResponseConstructionError
impl From<HeaderError> for ResponseConstructionError
Source§fn from(e: HeaderError) -> Self
fn from(e: HeaderError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for ResponseConstructionError
Auto Trait Implementations§
impl Freeze for ResponseConstructionError
impl RefUnwindSafe for ResponseConstructionError
impl Send for ResponseConstructionError
impl Sync for ResponseConstructionError
impl Unpin for ResponseConstructionError
impl UnsafeUnpin for ResponseConstructionError
impl UnwindSafe for ResponseConstructionError
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