Struct ggez::ContextBuilder[][src]

pub struct ContextBuilder { /* fields omitted */ }
Expand description

A builder object for creating a Context.

Implementations

Create a new ContextBuilder with default settings.

Sets the window setup settings.

Sets the window mode settings.

Sets the graphics backend.

Sets the modules configuration.

Sets all the config options, overriding any previous ones from window_setup(), window_mode(), and backend(). These are used as defaults and are overridden by any external config file found.

Add a new read-only filesystem path to the places to search for resources.

Add a new zip file from bytes whose contents will be searched for resources. The zip file will be stored in-memory. You can pass it a static slice, a Vec of bytes, etc.

use ggez::context::ContextBuilder;
let _ = ContextBuilder::new()
    .add_zipfile_bytes(include_bytes!("../resources.zip").to_vec())
    .build();

Specifies whether or not to load the conf.toml file if it exists and use its settings to override the provided values. Defaults to true which is usually what you want, but being able to fiddle with it is sometimes useful for debugging.

Build the Context.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.