Enum Severity
pub enum Severity {
Ignore,
Trace,
Debug,
Info,
Warning,
Error,
Panic,
}Expand description
Indicates how severe a BevyError is.
These levels correspond to traditional logging levels, but the severity is advisory metadata used by error handlers to decide how to react (for example: ignore, log, or panic).
To change the behavior of unhandled errors returned from systems,
you can modify the fallback error handler, and read the Severity stored inside of each BevyError.
You can change the severity of an error (including assigning an error severity) to an ordinary result
by calling with_severity or map_severity.
Variants§
Ignore
The error can be safely ignored, and can be completely discarded.
Trace
The error can be ignored, unless verbose debugging is required.
Debug
The error can be safely ignored, but may need to be surfaced during debugging.
Info
Nothing has gone wrong, but the error is useful to the user and should be reported.
Warning
Something unexpected but recoverable happened.
Something has probably gone wrong.
Error
A real error occurred, but the program may continue.
Panic
A fatal error; the program cannot continue.
Trait Implementations§
§impl Ord for Severity
impl Ord for Severity
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialOrd for Severity
impl PartialOrd for Severity
impl Copy for Severity
impl Eq for Severity
impl StructuralPartialEq for Severity
Auto Trait Implementations§
impl Freeze for Severity
impl RefUnwindSafe for Severity
impl Send for Severity
impl Sync for Severity
impl Unpin for Severity
impl UnsafeUnpin for Severity
impl UnwindSafe for Severity
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.