#[non_exhaustive]pub enum ServerError {
InvalidAddress {
address: String,
reason: String,
},
Bind {
address: String,
source: Error,
},
NestedRuntime,
Runtime(Error),
Io(Error),
}Expand description
Errors raised while starting or running the HTTP server (as opposed to errors produced while handling a request).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidAddress
The listen address could not be parsed or resolved.
Bind
Binding the TCP listener failed (address in use, permission denied…).
NestedRuntime
run_blocking was called from inside an active Tokio runtime.
Runtime(Error)
The Tokio runtime could not be created.
Io(Error)
An I/O error occurred on the listening socket.
Trait Implementations§
Source§impl Debug for ServerError
impl Debug for ServerError
Source§impl Display for ServerError
impl Display for ServerError
Source§impl Error for ServerError
impl Error for ServerError
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<Error> for ServerError
impl From<Error> for ServerError
Source§impl From<ServerError> for Error
impl From<ServerError> for Error
Source§fn from(err: ServerError) -> Self
fn from(err: ServerError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ServerError
impl !UnwindSafe for ServerError
impl Forget for ServerError
impl Freeze for ServerError
impl Send for ServerError
impl Sync for ServerError
impl Unpin for ServerError
impl UnsafeUnpin 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