pub struct WindowCloseRequested;Expand description
Emitted when the user requests to close the window.
This is a request, not a command. Games can intercept this event to show confirmation dialogs, save progress, or prevent accidental closure.
§Example
use goud_engine::core::events::WindowCloseRequested;
use goud_engine::core::event::Events;
fn handle_close_request(events: &Events<WindowCloseRequested>) {
let mut reader = events.reader();
for _event in reader.read() {
println!("Close requested - showing confirmation dialog");
// Show "Are you sure?" dialog, save game, etc.
// Only proceed with exit if user confirms
}
}Trait Implementations§
Source§impl Clone for WindowCloseRequested
impl Clone for WindowCloseRequested
Source§fn clone(&self) -> WindowCloseRequested
fn clone(&self) -> WindowCloseRequested
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WindowCloseRequested
impl Debug for WindowCloseRequested
Source§impl Default for WindowCloseRequested
impl Default for WindowCloseRequested
Source§fn default() -> WindowCloseRequested
fn default() -> WindowCloseRequested
Returns the “default value” for a type. Read more
Source§impl Hash for WindowCloseRequested
impl Hash for WindowCloseRequested
Source§impl PartialEq for WindowCloseRequested
impl PartialEq for WindowCloseRequested
impl Copy for WindowCloseRequested
impl Eq for WindowCloseRequested
impl StructuralPartialEq for WindowCloseRequested
Auto Trait Implementations§
impl Freeze for WindowCloseRequested
impl RefUnwindSafe for WindowCloseRequested
impl Send for WindowCloseRequested
impl Sync for WindowCloseRequested
impl Unpin for WindowCloseRequested
impl UnsafeUnpin for WindowCloseRequested
impl UnwindSafe for WindowCloseRequested
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().