Skip to main content

variant_non_exhaustive

Function variant_non_exhaustive 

Source
pub const fn variant_non_exhaustive(base: TypeId, variant: usize) -> bool
🔬This is a nightly-only experimental API. (core_intrinsics)
Expand description

Returns true when the variant represented by the base TypeId and variant_idx is non exhaustive.

The more user-friendly version of this intrinsic is core::mem::type_info::VariantId::non_exhaustive.