pub struct StartupHookError {
pub hook_name: Option<String>,
pub message: String,
pub abort: bool,
}Expand description
Error returned when a startup hook fails.
Fields§
§hook_name: Option<String>Name of the hook that failed (if provided).
message: StringThe underlying error message.
abort: boolWhether the application should abort startup.
Implementations§
Source§impl StartupHookError
impl StartupHookError
Sourcepub fn with_hook_name(self, name: impl Into<String>) -> Self
pub fn with_hook_name(self, name: impl Into<String>) -> Self
Set the hook name.
Sourcepub fn with_abort(self, abort: bool) -> Self
pub fn with_abort(self, abort: bool) -> Self
Set whether to abort startup.
Trait Implementations§
Source§impl Debug for StartupHookError
impl Debug for StartupHookError
Source§impl Display for StartupHookError
impl Display for StartupHookError
Source§impl Error for StartupHookError
impl Error for StartupHookError
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<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 StartupHookError
impl RefUnwindSafe for StartupHookError
impl Send for StartupHookError
impl Sync for StartupHookError
impl Unpin for StartupHookError
impl UnwindSafe for StartupHookError
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).