pub struct EngineConfig { /* private fields */ }Expand description
Unified engine configuration combining window settings and provider selection.
EngineConfig delegates window/display settings to GameConfig and
provider selection to ProviderRegistryBuilder. Call build()
to consume the builder and obtain both parts.
Implementations§
Source§impl EngineConfig
impl EngineConfig
Sourcepub fn with_title(self, title: impl Into<String>) -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
Sets the window title.
Sourcepub fn with_vsync(self, enabled: bool) -> Self
pub fn with_vsync(self, enabled: bool) -> Self
Enables or disables vertical sync.
Sourcepub fn with_fullscreen(self, enabled: bool) -> Self
pub fn with_fullscreen(self, enabled: bool) -> Self
Enables or disables fullscreen mode.
Sourcepub fn with_target_fps(self, fps: u32) -> Self
pub fn with_target_fps(self, fps: u32) -> Self
Sets the target frames per second (0 = unlimited).
Sourcepub fn with_fps_overlay(self, enabled: bool) -> Self
pub fn with_fps_overlay(self, enabled: bool) -> Self
Enables or disables the FPS stats overlay.
Sourcepub fn with_game_config(self, config: GameConfig) -> Self
pub fn with_game_config(self, config: GameConfig) -> Self
Replaces the entire GameConfig with the provided one.
Sourcepub fn with_render_provider(
self,
provider: impl RenderProvider + 'static,
) -> Self
pub fn with_render_provider( self, provider: impl RenderProvider + 'static, ) -> Self
Sets the render provider.
Sourcepub fn with_physics_provider(
self,
provider: impl PhysicsProvider + 'static,
) -> Self
pub fn with_physics_provider( self, provider: impl PhysicsProvider + 'static, ) -> Self
Sets the physics provider.
Sourcepub fn with_audio_provider(self, provider: impl AudioProvider + 'static) -> Self
pub fn with_audio_provider(self, provider: impl AudioProvider + 'static) -> Self
Sets the audio provider.
Sourcepub fn with_input_provider(self, provider: impl InputProvider + 'static) -> Self
pub fn with_input_provider(self, provider: impl InputProvider + 'static) -> Self
Sets the input provider.
Sourcepub fn build(self) -> (GameConfig, ProviderRegistry)
pub fn build(self) -> (GameConfig, ProviderRegistry)
Consumes the builder and returns the GameConfig and ProviderRegistry.
Sourcepub fn game_config(&self) -> &GameConfig
pub fn game_config(&self) -> &GameConfig
Returns a reference to the current game configuration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EngineConfig
impl !RefUnwindSafe for EngineConfig
impl Send for EngineConfig
impl Sync for EngineConfig
impl Unpin for EngineConfig
impl UnsafeUnpin for EngineConfig
impl !UnwindSafe for EngineConfig
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
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().