pub struct VariantId { /* private fields */ }🔬This is a nightly-only experimental API. (
type_info #146922)Expand description
Variant representing type ID. Representing a variant of an enum.
Implementations§
Source§impl VariantId
impl VariantId
Sourcepub const fn name(self) -> &'static str
🔬This is a nightly-only experimental API. (type_info #146922)
pub const fn name(self) -> &'static str
type_info #146922)Sourcepub const fn non_exhaustive(self) -> bool
🔬This is a nightly-only experimental API. (type_info #146922)
pub const fn non_exhaustive(self) -> bool
type_info #146922)Returns whether this variant is marked with #[non_exhaustive].
Sourcepub const fn reflected_attrs(self) -> &'static [&'static str]
🔬This is a nightly-only experimental API. (type_info #146922)
pub const fn reflected_attrs(self) -> &'static [&'static str]
type_info #146922)Given given a VariantId returns a list of attributes.
Only the attributes of the tool reflection_placeholder are returned, all other attributes are excluded.
The attributes are in a string representation.
Trait Implementations§
impl Copy for VariantId
impl Eq for VariantId
Source§impl Ord for VariantId
impl Ord for VariantId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for VariantId
impl PartialOrd for VariantId
impl StructuralPartialEq for VariantId
Auto Trait Implementations§
impl Forget for VariantId
impl Freeze for VariantId
impl Move for VariantId
impl RefUnwindSafe for VariantId
impl Send for VariantId
impl Sync for VariantId
impl Unpin for VariantId
impl UnsafeUnpin for VariantId
impl UnwindSafe for VariantId
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