pub trait RaylibMode2DExtwhere
Self: Sized,{
// Provided methods
fn begin_mode2D(
&mut self,
camera: impl Into<Camera2D>,
) -> RaylibMode2D<'_, Self> { ... }
fn draw_mode2D(
&mut self,
camera: Camera2D,
func: impl FnMut(RaylibMode2D<'_, Self>, Camera2D),
) { ... }
}
Provided Methods§
Sourcefn begin_mode2D(
&mut self,
camera: impl Into<Camera2D>,
) -> RaylibMode2D<'_, Self>
fn begin_mode2D( &mut self, camera: impl Into<Camera2D>, ) -> RaylibMode2D<'_, Self>
Begin 2D mode with custom camera (2D). Prefer using the closure version, RaylibMode2DExt::draw_mode2D. This version returns a handle that calls raylib_sys::EndMode2D at the end of the scope and is provided as a fallback incase you run into issues with closures(such as lifetime or performance reasons)
fn draw_mode2D( &mut self, camera: Camera2D, func: impl FnMut(RaylibMode2D<'_, Self>, Camera2D), )
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.