pub enum ErrorCategory {
Show 26 variants
Hooks,
CapitalizedCalls,
StaticComponents,
UseMemo,
VoidUseMemo,
PreserveManualMemo,
MemoDependencies,
IncompatibleLibrary,
Immutability,
Globals,
Refs,
EffectDependencies,
EffectExhaustiveDependencies,
EffectSetState,
EffectDerivationsOfState,
ErrorBoundaries,
Purity,
RenderSetState,
Invariant,
Todo,
Syntax,
UnsupportedSyntax,
Config,
Gating,
Suppression,
FBT,
}Expand description
Error categories matching the TS ErrorCategory enum
Variants§
Hooks
CapitalizedCalls
StaticComponents
UseMemo
VoidUseMemo
PreserveManualMemo
MemoDependencies
IncompatibleLibrary
Immutability
Globals
Refs
EffectDependencies
EffectExhaustiveDependencies
EffectSetState
EffectDerivationsOfState
ErrorBoundaries
Purity
RenderSetState
Invariant
Todo
Syntax
UnsupportedSyntax
Config
Gating
Suppression
FBT
Implementations§
Source§impl ErrorCategory
impl ErrorCategory
pub fn severity(&self) -> ErrorSeverity
Sourcepub fn logged_severity(&self) -> ErrorSeverity
pub fn logged_severity(&self) -> ErrorSeverity
The severity to use in logged output, matching the TS compiler’s
getRuleForCategory(). This may differ from the internal severity()
used for panicThreshold logic. In particular, PreserveManualMemo is
Warning internally (so it doesn’t trigger panicThreshold throws) but
Error in logged output (matching TS behavior).
Trait Implementations§
Source§impl Clone for ErrorCategory
impl Clone for ErrorCategory
Source§fn clone(&self) -> ErrorCategory
fn clone(&self) -> ErrorCategory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ErrorCategory
Source§impl Debug for ErrorCategory
impl Debug for ErrorCategory
Source§impl<'de> Deserialize<'de> for ErrorCategory
impl<'de> Deserialize<'de> for ErrorCategory
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorCategory, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorCategory, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ErrorCategory
Source§impl PartialEq for ErrorCategory
impl PartialEq for ErrorCategory
Source§fn eq(&self, other: &ErrorCategory) -> bool
fn eq(&self, other: &ErrorCategory) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ErrorCategory
impl Serialize for ErrorCategory
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ErrorCategory
Auto Trait Implementations§
impl Freeze for ErrorCategory
impl RefUnwindSafe for ErrorCategory
impl Send for ErrorCategory
impl Sync for ErrorCategory
impl Unpin for ErrorCategory
impl UnsafeUnpin for ErrorCategory
impl UnwindSafe for ErrorCategory
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,
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§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.