#[repr(u8)]pub enum Category {
Show 21 variants
Index = 0,
Overflow = 1,
DivideByZero = 2,
RemainderByZero = 3,
Unwrap = 4,
Explicit = 5,
StrBoundary = 6,
Borrow = 7,
Poison = 8,
CapacityOverflow = 9,
AllocFailure = 10,
RefCountOverflow = 11,
Fmt = 12,
NullDeref = 13,
MisalignedRef = 14,
Unknown = 15,
UbCheck = 16,
Foreign = 17,
DynCall = 18,
FnPointer = 19,
GenericBound = 20,
}Expand description
A kind of panic, as reported to the user.
The discriminants are stable because they index into CategorySet.
Variants§
Index = 0
Slice or array index out of bounds.
Overflow = 1
Arithmetic overflow. Only present when overflow checks are enabled.
DivideByZero = 2
Integer division by zero.
RemainderByZero = 3
Integer remainder by zero.
Unwrap = 4
Option::unwrap, Result::unwrap, expect, and friends.
Explicit = 5
panic!, assert!, unreachable!, todo!, and friends.
StrBoundary = 6
Slicing a str at a non-character boundary.
Borrow = 7
A RefCell borrow conflict.
Poison = 8
A poisoned Mutex or RwLock.
CapacityOverflow = 9
A collection grew past the maximum representable capacity.
AllocFailure = 10
The allocator could not satisfy a request.
RefCountOverflow = 11
An Rc or Arc strong count overflowed.
Fmt = 12
A panic raised from inside the formatting machinery.
NullDeref = 13
A null pointer was dereferenced.
MisalignedRef = 14
A reference was constructed from a misaligned pointer.
Unknown = 15
A panic whose origin the analysis could not classify.
UbCheck = 16
A standard library precondition check, present only in a build that has undefined behaviour checks turned on.
Foreign = 17
A call into foreign code, which has no Rust body to read.
DynCall = 18
A dynamic call, whose target set the analysis does not resolve.
FnPointer = 19
A call through a function pointer, whose target is unknown.
GenericBound = 20
A call that resolves only once a caller supplies concrete generic arguments, so what it reaches is the caller’s choice.
Implementations§
Trait Implementations§
impl Copy for Category
Source§impl<'de> Deserialize<'de> for Category
impl<'de> Deserialize<'de> for Category
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Category
Source§impl FromIterator<Category> for CategorySet
impl FromIterator<Category> for CategorySet
Source§impl Ord for Category
impl Ord for Category
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Category
impl PartialOrd for Category
impl StructuralPartialEq for Category
Auto Trait Implementations§
impl Freeze for Category
impl RefUnwindSafe for Category
impl Send for Category
impl Sync for Category
impl Unpin for Category
impl UnsafeUnpin for Category
impl UnwindSafe for Category
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.