pub struct LifespanError {
pub message: String,
pub source: Option<Box<dyn Error + Send + Sync>>,
}Expand description
Error during lifespan startup.
This error is returned when the lifespan function fails during the startup phase. It will abort the application startup, preventing the server from accepting connections.
Fields§
§message: StringDescription of what went wrong.
source: Option<Box<dyn Error + Send + Sync>>Optional underlying error source.
Implementations§
Trait Implementations§
Source§impl Debug for LifespanError
impl Debug for LifespanError
Source§impl Display for LifespanError
impl Display for LifespanError
Source§impl Error for LifespanError
impl Error for LifespanError
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<LifespanError> for StartupHookError
impl From<LifespanError> for StartupHookError
Source§fn from(err: LifespanError) -> Self
fn from(err: LifespanError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LifespanError
impl !RefUnwindSafe for LifespanError
impl Send for LifespanError
impl Sync for LifespanError
impl Unpin for LifespanError
impl !UnwindSafe for LifespanError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).