pub struct Sdl { /* private fields */ }
Expand description
A root controller for SDL2. But some sub-feature does not require Sdl
.
Implementations§
Source§impl Sdl
impl Sdl
Sourcepub fn new() -> Self
pub fn new() -> Self
Setup the SDL2 system.
§Panics
Panics if SDL2 system is already initialized such as there are existing Sdl
instances
Sourcepub fn version() -> SdlVersion
pub fn version() -> SdlVersion
Returns the version of SDL2.
Sourcepub fn revision_str() -> &'static str
pub fn revision_str() -> &'static str
Returns the revision string.
Sourcepub fn revision_num() -> u32
pub fn revision_num() -> u32
Returns the revision number.
Sourcepub fn error_then_panic(context: &'static str) -> !
pub fn error_then_panic(context: &'static str) -> !
On an unrecoverable error detected, panics with the provided context
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sdl
impl !RefUnwindSafe for Sdl
impl Send for Sdl
impl !Sync for Sdl
impl Unpin for Sdl
impl UnwindSafe for Sdl
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