pub struct Context { /* private fields */ }
Expand description

Game context.

In most cases, this should never actually be used; instead, just pass it around to the various cat-box functions such as Sprite::draw().

Implementations

Get the inner Canvas and TextureCreator.

Only use this method if you know what you’re doing.

Set the background colour. See Canvas::set_draw_color() for more info.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.