pub struct BoundedCanvas<'a> { /* private fields */ }
Expand description

A sub-area of a canvas. It will handle the adjustments of cursor movement, so that you could write to for example (0, 0) and BoundedCanvas will adjust it to real position.

Implementations

Trait Implementations

Get the canvas size (width, height)
clear the canvas
change a cell of position (row, col) to cell if (row, col) is out of boundary, Ok is returned, but no operation is taken return the width of the character/cell Read more
move cursor position (row, col) and show cursor
show/hide cursor, set show to false to hide the cursor
just like put_cell, except it accept (char & attr) return the width of the character/cell Read more
print content starting with position (row, col) with attr Read more
print content starting with position (row, col) with default attribute

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.