[][src]Struct ggez::conf::Conf

pub struct Conf {
    pub window_mode: WindowMode,
    pub window_setup: WindowSetup,
    pub backend: Backend,
    pub modules: ModuleConf,

A structure containing configuration data for the game engine.


Conf {
    window_mode: WindowMode::default(),
    window_setup: WindowSetup::default(),
    backend: Backend::default(),
    modules: ModuleConf::default(),


window_mode: WindowMode

Window setting information that can be set at runtime

window_setup: WindowSetup

Window setting information that must be set at init-time

backend: Backend

Backend configuration

modules: ModuleConf

Which modules to enable.


impl Conf[src]

pub fn new() -> Self[src]

Same as Conf::default()

pub fn from_toml_file<R: Read>(file: &mut R) -> GameResult<Conf>[src]

Load a TOML file from the given Read and attempts to parse a Conf from it.

pub fn to_toml_file<W: Write>(&self, file: &mut W) -> GameResult[src]

Saves the Conf to the given Write object, formatted as TOML.

pub fn window_mode(self, window_mode: WindowMode) -> Self[src]

Sets the window mode

pub fn backend(self, backend: Backend) -> Self[src]

Sets the backend

pub fn modules(self, modules: ModuleConf) -> Self[src]

Sets the backend

Trait Implementations

impl PartialEq<Conf> for Conf[src]

impl Clone for Conf[src]

default fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

impl Default for Conf[src]

fn default() -> Self[src]

Return Conf { window_mode: Default::default(), window_setup: Default::default(), backend: Default::default(), modules: Default::default() }

impl Debug for Conf[src]

impl Serialize for Conf[src]

impl<'de> Deserialize<'de> for Conf[src]

Auto Trait Implementations

impl Send for Conf

impl Sync for Conf

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone

type Owned = T

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 

impl<T, U> TryFrom for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> BorrowMut for T where
    T: ?Sized

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 

impl<T> Erased for T

impl<T> SetParameter for T

default fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.