pub struct SentinelError {
pub name: String,
pub message: Option<String>,
pub alias_of: Option<String>,
}Expand description
An exported package-level sentinel error variable (var ErrNotFound = errors.New("not found")).
Fields§
§name: String§message: Option<String>The static error text when initialized with a string literal (errors.New("...") or
format-free fmt.Errorf("...")), None when the text is computed at run time.
alias_of: Option<String>Another exported sentinel in the same package that this variable aliases
(var ErrAlias = ErrBase or var ErrAlias error = ErrBase).
Trait Implementations§
Source§impl Clone for SentinelError
impl Clone for SentinelError
Source§impl Debug for SentinelError
impl Debug for SentinelError
impl Eq for SentinelError
Source§impl PartialEq for SentinelError
impl PartialEq for SentinelError
impl StructuralPartialEq for SentinelError
Auto Trait Implementations§
impl Forget for SentinelError
impl Freeze for SentinelError
impl Move for SentinelError
impl RefUnwindSafe for SentinelError
impl Send for SentinelError
impl Sync for SentinelError
impl Unpin for SentinelError
impl UnsafeUnpin for SentinelError
impl UnwindSafe for SentinelError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.