Struct sdl2::event::EventWatch[][src]

pub struct EventWatch<'a, CB: EventWatchCallback + 'a> { /* fields omitted */ }

An handler for the event watch callback. One must bind this struct in a variable as long as you want to keep the callback active. For further information, see [EventSubsystem::add_event_watch].

Implementations

impl<'a, CB: EventWatchCallback + 'a> EventWatch<'a, CB>[src]

pub fn activate(&mut self)[src]

Activates the event watch. Does nothing if it is already activated.

pub fn deactivate(&mut self)[src]

Deactivates the event watch. Does nothing if it is already activated.

pub fn activated(&self) -> bool[src]

Returns if the event watch is activated.

pub fn set_activated(&mut self, activate: bool)[src]

Set the activation state of the event watch.

Trait Implementations

impl<'a, CB: EventWatchCallback + 'a> Drop for EventWatch<'a, CB>[src]

Auto Trait Implementations

impl<'a, CB> RefUnwindSafe for EventWatch<'a, CB> where
    CB: RefUnwindSafe

impl<'a, CB> Send for EventWatch<'a, CB> where
    CB: Send + Sync

impl<'a, CB> Sync for EventWatch<'a, CB> where
    CB: Sync

impl<'a, CB> Unpin for EventWatch<'a, CB>

impl<'a, CB> UnwindSafe for EventWatch<'a, CB> where
    CB: RefUnwindSafe + UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.