Trait entity::EntWrapper [−][src]
pub trait EntWrapper: Sized { fn wrap_ent(ent: Box<dyn Ent>) -> Option<Self>; fn can_wrap_ent(ent: &dyn Ent) -> bool; }
Represents a wrapper around some set of ents that implement Ent
,
useful for edges that can return one of many different types that are
variants of an enum
Required methods
fn wrap_ent(ent: Box<dyn Ent>) -> Option<Self>
[src]
Returns Some(impl EntWrapper) if the wrapper is able to wrap around
the given Ent
trait object, otherwise returns None
fn can_wrap_ent(ent: &dyn Ent) -> bool
[src]
Returns true if able to wrap the given ent trait object, otherwise returns false