Struct sdl2::event::EventWatch
source · pub struct EventWatch<'a, CB: EventWatchCallback + 'a> { /* private fields */ }
Expand description
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§
source§impl<'a, CB: EventWatchCallback + 'a> EventWatch<'a, CB>
impl<'a, CB: EventWatchCallback + 'a> EventWatch<'a, CB>
sourcepub fn deactivate(&mut self)
pub fn deactivate(&mut self)
Deactivates the event watch. Does nothing if it is already activated.
sourcepub fn set_activated(&mut self, activate: bool)
pub fn set_activated(&mut self, activate: bool)
Set the activation state of the event watch.
Trait Implementations§
source§impl<'a, CB: EventWatchCallback + 'a> Drop for EventWatch<'a, CB>
impl<'a, CB: EventWatchCallback + 'a> Drop for EventWatch<'a, CB>
Auto Trait Implementations§
impl<'a, CB> Freeze for EventWatch<'a, CB>
impl<'a, CB> RefUnwindSafe for EventWatch<'a, CB>where
CB: RefUnwindSafe,
impl<'a, CB> Send for EventWatch<'a, CB>
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: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more