pub struct Canvas { /* private fields */ }
Implementations§
Source§impl Canvas
impl Canvas
pub fn new() -> Self
pub fn draw_horizontal_line( &mut self, start: (usize, usize), end: (usize, usize), use_thick: bool, )
Sourcepub fn eraser_horizontal_line(
&mut self,
start: (usize, usize),
end: (usize, usize),
use_thick: bool,
)
pub fn eraser_horizontal_line( &mut self, start: (usize, usize), end: (usize, usize), use_thick: bool, )
erase all lines that overlaps this line
pub fn draw_vertical_line( &mut self, start: (usize, usize), end: (usize, usize), use_thick: bool, )
pub fn draw_rect( &mut self, start: (usize, usize), end: (usize, usize), border: Border, )
pub fn draw_text(&mut self, start: (usize, usize), text: &str)
pub fn get_cells<'a>( &'a self, ) -> Box<dyn Iterator<Item = (usize, usize, char)> + 'a>
pub fn dump(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Canvas
impl RefUnwindSafe for Canvas
impl Send for Canvas
impl Sync for Canvas
impl Unpin for Canvas
impl UnwindSafe for Canvas
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more