IsType

Trait IsType 

Source
pub trait IsType {
    // Provided method
    fn is<T>(&self) -> bool
       where T: 'static,
             Self: 'static { ... }
}
Expand description

The IsType trait provides a method to check if the current type is of a specific type at runtime. This is useful for dynamic type checking in scenarios where the type may not be known at compile time.

Provided Methods§

Source

fn is<T>(&self) -> bool
where T: 'static, Self: 'static,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> IsType for T
where T: 'static,