#[non_exhaustive]pub enum Quit {
Game,
System,
}Expand description
How the player leaves a game on a target.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Game
The game’s own Quit closes it (a desktop’s window).
System
The player leaves through the system (a browser’s tab, the Playdate’s Home, a console’s or a phone’s home button), and a game shows no Quit.
Trait Implementations§
impl Copy for Quit
Source§impl<'de> Deserialize<'de> for Quit
impl<'de> Deserialize<'de> for Quit
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Quit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Quit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Quit
Source§impl Serialize for Quit
impl Serialize for Quit
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Quit
Auto Trait Implementations§
impl Freeze for Quit
impl RefUnwindSafe for Quit
impl Send for Quit
impl Sync for Quit
impl Unpin for Quit
impl UnsafeUnpin for Quit
impl UnwindSafe for Quit
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