pub enum ServerError {
TcpBind(String),
Unknown(String),
HttpRead(String),
InvalidHttpRequest(Request),
Other(String),
}Expand description
Represents errors that can occur at the server level.
Variants§
TcpBind(String)
An error occurred while trying to bind to a TCP socket.
Unknown(String)
An unknown or unexpected error occurred.
HttpRead(String)
An error occurred while reading an HTTP request.
InvalidHttpRequest(Request)
The received HTTP request was invalid or malformed.
Other(String)
Other error.
Trait Implementations§
Source§impl Clone for ServerError
impl Clone for ServerError
Source§fn clone(&self) -> ServerError
fn clone(&self) -> ServerError
Returns a duplicate of the value. Read more
1.0.0 · 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 ServerError
impl Debug for ServerError
Source§impl<'de> Deserialize<'de> for ServerError
impl<'de> Deserialize<'de> for ServerError
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
Source§impl Display for ServerError
impl Display for ServerError
Source§impl From<Error> for ServerError
Implementation of From trait for converting external errors into ServerError.
impl From<Error> for ServerError
Implementation of From trait for converting external errors into ServerError.
This allows using the ? operator to automatically convert std::io::Error
into ServerError::TcpBind when binding to a TCP socket.
Source§impl PartialEq for ServerError
impl PartialEq for ServerError
Source§impl Serialize for ServerError
impl Serialize for ServerError
impl Eq for ServerError
impl StructuralPartialEq for ServerError
Auto Trait Implementations§
impl Freeze for ServerError
impl RefUnwindSafe for ServerError
impl Send for ServerError
impl Sync for ServerError
impl Unpin for ServerError
impl UnwindSafe for ServerError
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