pub enum UserEvent<T: 'static + Clone + Send + Sync> {
RebuildSwapchain,
Collision(Arc<RwLock<dyn GameObject>>, Arc<RwLock<dyn GameObject>>),
WinitEvent(Event<'static, Box<UserEvent<T>>>),
UserEvent(T),
None,
}Expand description
A wrapper for winit events.
This enum allows for the definition of custom events with the UserEvent enumeration constant.
Variants§
RebuildSwapchain
Collision(Arc<RwLock<dyn GameObject>>, Arc<RwLock<dyn GameObject>>)
WinitEvent(Event<'static, Box<UserEvent<T>>>)
UserEvent(T)
None
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for UserEvent<T>where
T: Freeze,
impl<T> RefUnwindSafe for UserEvent<T>where
T: RefUnwindSafe,
impl<T> Send for UserEvent<T>
impl<T> Sync for UserEvent<T>
impl<T> Unpin for UserEvent<T>where
T: Unpin,
impl<T> !UnwindSafe for UserEvent<T>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Content for T
impl<T> Content for T
Source§fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
Source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
Source§fn indiv_size() -> usize
fn indiv_size() -> usize
Returns the size of an individual element.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more