#[repr(transparent)]pub struct SDL_AppResult(pub c_int);Expand description
Return values for optional main callbacks.
Returning SDL_APP_SUCCESS or SDL_APP_FAILURE from SDL_AppInit,
SDL_AppEvent, or SDL_AppIterate will terminate the program and report
success/failure to the operating system. What that means is
platform-dependent. On Unix, for example, on success, the process error
code will be zero, and on failure it will be 1. This interface doesn’t
allow you to return specific exit codes, just whether there was an error
generally or not.
Returning SDL_APP_CONTINUE from these functions will let the app continue
to run.
See Main callbacks in SDL3 for complete details.
§Availability
This enum is available since SDL 3.2.0.
§Known values (sdl3-sys)
| Associated constant | Global constant | Description |
|---|---|---|
CONTINUE | SDL_APP_CONTINUE | Value that requests that the app continue from the main callbacks. |
SUCCESS | SDL_APP_SUCCESS | Value that requests termination with success from the main callbacks. |
FAILURE | SDL_APP_FAILURE | Value that requests termination with error from the main callbacks. |
Tuple Fields§
§0: c_intImplementations§
Source§impl SDL_AppResult
impl SDL_AppResult
Trait Implementations§
Source§impl Clone for SDL_AppResult
impl Clone for SDL_AppResult
Source§fn clone(&self) -> SDL_AppResult
fn clone(&self) -> SDL_AppResult
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 SDL_AppResult
Available on crate feature debug-impls only.
impl Debug for SDL_AppResult
Available on crate feature
debug-impls only.Source§impl Default for SDL_AppResult
impl Default for SDL_AppResult
Source§fn default() -> SDL_AppResult
fn default() -> SDL_AppResult
Returns the “default value” for a type. Read more
Source§impl From<SDL_AppResult> for c_int
impl From<SDL_AppResult> for c_int
Source§fn from(value: SDL_AppResult) -> Self
fn from(value: SDL_AppResult) -> Self
Converts to this type from the input type.
Source§impl GroupMetadata for SDL_AppResult
Available on crate feature metadata only.
impl GroupMetadata for SDL_AppResult
Available on crate feature
metadata only.Source§const GROUP_METADATA: &'static Group
const GROUP_METADATA: &'static Group
Metadata for this group
Source§impl Hash for SDL_AppResult
impl Hash for SDL_AppResult
Source§impl Ord for SDL_AppResult
impl Ord for SDL_AppResult
Source§fn cmp(&self, other: &SDL_AppResult) -> Ordering
fn cmp(&self, other: &SDL_AppResult) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq<SDL_AppResult> for c_int
impl PartialEq<SDL_AppResult> for c_int
Source§impl PartialEq<i32> for SDL_AppResult
impl PartialEq<i32> for SDL_AppResult
Source§impl PartialEq for SDL_AppResult
impl PartialEq for SDL_AppResult
Source§impl PartialOrd for SDL_AppResult
impl PartialOrd for SDL_AppResult
impl Copy for SDL_AppResult
impl Eq for SDL_AppResult
impl StructuralPartialEq for SDL_AppResult
Auto Trait Implementations§
impl Freeze for SDL_AppResult
impl RefUnwindSafe for SDL_AppResult
impl Send for SDL_AppResult
impl Sync for SDL_AppResult
impl Unpin for SDL_AppResult
impl UnwindSafe for SDL_AppResult
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