[−][src]Struct orbtk_api::event::EventBox
Internal wrapper for an event, including the strategy and source entity.
Fields
source: Entity
strategy: EventStrategy
Implementations
impl EventBox
[src]
pub fn new<E: Event>(event: E, strategy: EventStrategy, source: Entity) -> Self
[src]
Creates a new EventBox
.
pub fn is_type<E: Event>(&self) -> bool
[src]
Check if the given type is the type of the event.
pub fn event_type(&self) -> TypeId
[src]
Returns the type of the event.
pub fn downcast<E: Event>(self) -> Result<E, EventError>
[src]
Downcasts the box to an concrete event.
pub fn downcast_ref<E: Any>(&self) -> Result<&E, EventError>
[src]
Downcasts the box as reference of an concrete event.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for EventBox
impl !Send for EventBox
impl !Sync for EventBox
impl Unpin for EventBox
impl !UnwindSafe for EventBox
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<E> Component for E where
E: Any,
[src]
E: Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,