pub trait NonExhaustiveSharedOps {
    type Discriminant: ValidDiscriminant;

    // Required methods
    fn get_discriminant_(&self) -> Self::Discriminant;
    fn enum_info_(&self) -> &'static EnumInfo;
}
Expand description

Used to abstract over the reference-ness of NonExhaustive inside UnwrapEnumError.

Required Associated Types§

source

type Discriminant: ValidDiscriminant

The type of the discriminant of the wrapped enum.

Required Methods§

source

fn get_discriminant_(&self) -> Self::Discriminant

Gets the discriminant of the wrapped enum.

source

fn enum_info_(&self) -> &'static EnumInfo

Gets miscelaneous information about the wrapped enum

Implementors§

source§

impl<'a, E, S, I> NonExhaustiveSharedOps for &'a NonExhaustive<E, S, I>
where E: GetEnumInfo,

source§

impl<'a, E, S, I> NonExhaustiveSharedOps for &'a mut NonExhaustive<E, S, I>
where E: GetEnumInfo,

source§

impl<E, S, I> NonExhaustiveSharedOps for NonExhaustive<E, S, I>
where E: GetEnumInfo,