Trait enumcapsulate::IsVariant
source · pub trait IsVariant {
// Required method
fn is_variant<T>(&self) -> bool
where T: 'static + ?Sized;
}Expand description
Used to check type of an enum’s inner variant’s type.
Required Methods§
sourcefn is_variant<T>(&self) -> boolwhere
T: 'static + ?Sized,
fn is_variant<T>(&self) -> boolwhere
T: 'static + ?Sized,
Returns true if T matches the variant’s type, otherwise false.
Object Safety§
This trait is not object safe.