Struct rich_sdl2_rust::Sdl
source · 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 !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