ShapeExt

Trait ShapeExt 

Source
pub trait ShapeExt {
    // Required methods
    fn is_type<Other: Facet>(&'static self) -> bool;
    fn assert_type<Other: Facet>(&'static self);
}
Expand description

Extension trait to provide is_type and assert_type

Required Methods§

Source

fn is_type<Other: Facet>(&'static self) -> bool

Check if this shape is of the given type

Source

fn assert_type<Other: Facet>(&'static self)

Assert that this shape is of the given type, panicking if it’s not

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§