pub struct HttpError {
pub drop_connection: Option<bool>,
pub response_bytes: Option<String>,
pub delay: Option<Delay>,
}Expand description
Error action — return a connection-level error to the caller.
Fields§
§drop_connection: Option<bool>§response_bytes: Option<String>§delay: Option<Delay>Delay applied before the error is returned.
Implementations§
Source§impl HttpError
impl HttpError
Sourcepub fn drop_connection(self, drop: bool) -> Self
pub fn drop_connection(self, drop: bool) -> Self
Drop the connection without a response.
Sourcepub fn response_bytes(self, bytes: impl Into<String>) -> Self
pub fn response_bytes(self, bytes: impl Into<String>) -> Self
Send arbitrary bytes then close.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HttpError
impl<'de> Deserialize<'de> for HttpError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for HttpError
Auto Trait Implementations§
impl Freeze for HttpError
impl RefUnwindSafe for HttpError
impl Send for HttpError
impl Sync for HttpError
impl Unpin for HttpError
impl UnsafeUnpin for HttpError
impl UnwindSafe for HttpError
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