Struct sdl2::event::EventWatch [−][src]
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,
CB: RefUnwindSafe,
impl<'a, CB> Send for EventWatch<'a, CB> where
CB: Send + Sync,
CB: Send + Sync,
impl<'a, CB> Sync for EventWatch<'a, CB> where
CB: Sync,
CB: Sync,
impl<'a, CB> Unpin for EventWatch<'a, CB>
impl<'a, CB> UnwindSafe for EventWatch<'a, CB> where
CB: RefUnwindSafe + UnwindSafe,
CB: RefUnwindSafe + UnwindSafe,
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub 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>,