pub trait TryWithKind {
// Required method
fn try_with_kind<T: EntityKind>(self) -> Option<T>;
}Expand description
Extension trait used to safely cast an Entity into an EntityKind.
Required Methods§
Sourcefn try_with_kind<T: EntityKind>(self) -> Option<T>
fn try_with_kind<T: EntityKind>(self) -> Option<T>
Checks if this Entity has the given EntityKind and returns it.
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.