pub struct Locked<'a, B: Buffer> { /* private fields */ }
Expand description

A GPU component on which methods can be invoked.

This type combines a GPU address, an Invoker that can be used to make method calls, and a scratch buffer used to perform CBOR encoding and decoding. A value of this type can be created by calling Gpu::lock, and it can be dropped to return the borrow of the invoker and buffer to the caller so they can be reused for other purposes.

The 'a lifetime is the lifetime of the invoker and the buffer. The B type is the type of scratch buffer to use.

Implementations

Binds the GPU to a screen.

If reset is true, then the screen is reset to its maximum resolution and colour depth, and its colours are set to white on black. The text content, however, is not cleared.

Errors

Returns the address of the screen the GPU is bound to, or None if it is unbound.

Errors

Returns the background colour.

Errors

Sets the background colour, returning the old colour.

Errors

Returns the foreground colour.

Errors

Sets the foreground colour, returning the old colour.

Errors

Returns the colour at a palette index.

Errors

Sets the colour at a palette index, returning the old colour.

Errors

Returns the maximum supported colour depth based on the tiers of the GPU and the bound screen.

Errors

Returns the colour depth currently in use.

Errors

Sets the colour depth.

Errors

Returns the maximum supported resolution based on the tiers of the GPU and the bound screen.

Errors

Returns the resolution currently in use.

Errors

Sets the screen resolution, returning whether or not it was changed from its previous value.

Errors

Returns the viewport currently in use.

Errors

Sets the viewport, returning whether or not it was changed from its previous value.

Errors

Returns the character and colours at a specific character cell.

It is possible for a Java string to contain an unpaired UTF-16 surrogate half. It is possible (in Lua, at least) to place such a byte sequence into a character cell in a screen. Should this method be called on such a character cell, a replacement character is silently returned instead.

Errors

Writes text to the screen.

Errors

Copies data from one rectangle to another.

Errors

Fills a rectangle with a character.

Errors

Trait Implementations

Formats the value using the given formatter. Read more

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.