pub struct GridSlice<'a> { /* private fields */ }Implementations§
Source§impl<'a> GridSlice<'a>
impl<'a> GridSlice<'a>
pub fn width(&self) -> u16
pub fn height(&self) -> u16
pub fn to_grid_rect(&self, rect: Rect) -> Rect
pub fn to_local_rect(&self, rect: Rect) -> Rect
pub fn slice_mut(&mut self, area: Rect) -> GridSlice<'_>
pub fn set(&mut self, x: u16, y: u16, symbol: char, style: Style)
Sourcepub fn cell(&self, x: u16, y: u16) -> Cell
pub fn cell(&self, x: u16, y: u16) -> Cell
Read a cell at slice-local coords; returns default Cell when out of bounds.
Sourcepub fn cell_mut(&mut self, x: u16, y: u16) -> Option<&mut Cell>
pub fn cell_mut(&mut self, x: u16, y: u16) -> Option<&mut Cell>
Mutable cell access at slice-local coords. See Grid::cell_mut for caveats.
pub fn put_str(&mut self, x: u16, y: u16, text: &str, style: Style) -> u16
pub fn put_padded( &mut self, x: u16, y: u16, width: u16, text: &str, style: Style, ) -> u16
pub fn put_str_aligned( &mut self, x: u16, y: u16, width: u16, text: &str, align: TextAlign, style: Style, ) -> u16
pub fn fill_row(&mut self, y: u16, style: Style)
pub fn rule_h(&mut self, y: u16, style: Style)
pub fn rule_v(&mut self, x: u16, style: Style)
pub fn rule_h_range(&mut self, x: u16, y: u16, width: u16, style: Style)
pub fn rule_v_range(&mut self, x: u16, y: u16, height: u16, style: Style)
Sourcepub fn put_char(&mut self, x: u16, y: u16, symbol: char, fg: Color)
pub fn put_char(&mut self, x: u16, y: u16, symbol: char, fg: Color)
Slice-local Grid::put_char: overwrites symbol + fg, preserves bg and attrs.
Sourcepub fn put_line(&mut self, x: u16, y: u16, line: &Line<'_>) -> u16
pub fn put_line(&mut self, x: u16, y: u16, line: &Line<'_>) -> u16
Slice-local Grid::put_line: paint spans left-to-right, clipping at the slice edge.
Sourcepub fn put_str_fg(&mut self, x: u16, y: u16, text: &str, fg: Color) -> u16
pub fn put_str_fg(&mut self, x: u16, y: u16, text: &str, fg: Color) -> u16
Slice-local Grid::put_str_fg: overwrites symbol + fg per char, preserves bg and attrs.
pub fn fill(&mut self, area: Rect, symbol: char, style: Style)
pub fn clear(&mut self)
Auto Trait Implementations§
impl<'a> !UnwindSafe for GridSlice<'a>
impl<'a> Freeze for GridSlice<'a>
impl<'a> RefUnwindSafe for GridSlice<'a>
impl<'a> Send for GridSlice<'a>
impl<'a> Sync for GridSlice<'a>
impl<'a> Unpin for GridSlice<'a>
impl<'a> UnsafeUnpin for GridSlice<'a>
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