pub struct PDBError { /* private fields */ }
Expand description
An error surfacing while handling a PDB
Implementations§
source§impl PDBError
impl PDBError
sourcepub fn new(
level: ErrorLevel,
short_desc: impl ToString,
long_descr: impl ToString,
context: Context
) -> PDBError
pub fn new( level: ErrorLevel, short_desc: impl ToString, long_descr: impl ToString, context: Context ) -> PDBError
Create a new PDBError
Arguments
level
- The level of the error, defining how it should be handledshort_desc
- A short description of the error, generally used as title linelong_desc
- A longer description of the error, presented below the context to give more information and helpful feedbackcontext
- The context, in the most general sense this produces output which leads the user to the right place in the code or file
sourcepub const fn level(&self) -> ErrorLevel
pub const fn level(&self) -> ErrorLevel
The level of the error
sourcepub fn fails(&self, level: StrictnessLevel) -> bool
pub fn fails(&self, level: StrictnessLevel) -> bool
Tests if this errors is breaking with the given strictness level
sourcepub fn short_description(&self) -> &str
pub fn short_description(&self) -> &str
Gives the short description or title for this error
sourcepub fn long_description(&self) -> &str
pub fn long_description(&self) -> &str
Gives the long description for this error
Trait Implementations§
source§impl Error for PDBError
impl Error for PDBError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 Ord for PDBError
impl Ord for PDBError
source§impl PartialEq<PDBError> for PDBError
impl PartialEq<PDBError> for PDBError
source§impl PartialOrd<PDBError> for PDBError
impl PartialOrd<PDBError> for PDBError
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for PDBError
impl StructuralEq for PDBError
impl StructuralPartialEq for PDBError
Auto Trait Implementations§
impl RefUnwindSafe for PDBError
impl Send for PDBError
impl Sync for PDBError
impl Unpin for PDBError
impl UnwindSafe for PDBError
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.