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§

source

fn is_variant<T>(&self) -> bool
where T: 'static + ?Sized,

Returns true if T matches the variant’s type, otherwise false.

Object Safety§

This trait is not object safe.

Implementors§