pub fn downcast<E: Event>(self) -> Result<E, EventError> {
        if self.event_type == TypeId::of::<E>() {
            return Ok(*self.event.downcast::<E>().unwrap());
        }

        Err(EventError::WrongType(TypeId::of::<E>()))
    }
/// Downcasts the box to an concrete event.
Downcasts the box to an concrete event.
Downcasts the box to an concrete event .
pub fn downcast<E: Event>(self) -> Result<E, EventError> {
        if self.event_type == TypeId::of::<E>() {
            return Ok(*self.event.downcast::<E>().unwrap());
        }
        Err(EventError::WrongType(TypeId::of::<E>()))
    }
pub fn downcast < E : Event > ( self ) -> Result < E , EventError > { if self . event_type == TypeId :: of :: < E > ( ) { return Ok ( * self . event . downcast :: < E > ( ) . unwrap ( ) ) ; } Err ( EventError :: WrongType ( TypeId :: of :: < E > ( ) ) ) }
Downcasts the box to an concrete event.
Downcasts the box to an concrete event .
self