pub struct Buffer {
pub width: usize,
pub height: usize,
/* private fields */
}Fields§
§width: usize§height: usizeImplementations§
Source§impl Buffer
impl Buffer
pub fn new(width: usize, height: usize) -> Self
pub fn with_background(width: usize, height: usize, bg: Option<Color>) -> Self
pub fn index(&self, x: usize, y: usize) -> usize
pub fn get(&self, x: usize, y: usize) -> Option<&Cell>
pub fn cell_mut(&mut self, x: usize, y: usize) -> Option<&mut Cell>
pub fn set(&mut self, x: usize, y: usize, cell: Cell)
pub fn is_skip(&self, x: usize, y: usize) -> bool
pub fn set_str( &mut self, x: usize, y: usize, s: &str, fg: Color, bg: Option<Color>, )
pub fn set_str_bold( &mut self, x: usize, y: usize, s: &str, fg: Color, bg: Option<Color>, )
pub fn fill(&mut self, area: Rect, ch: char, fg: Color, bg: Option<Color>)
pub fn clear(&mut self, area: Rect)
pub fn clear_area(&mut self, area: Rect, bg: Option<Color>)
pub fn to_ansi_string(&self) -> String
pub fn to_plain_string(&self) -> String
pub fn width(&self) -> usize
pub fn height(&self) -> usize
pub fn cells(&self) -> &[Cell]
pub fn cells_mut(&mut self) -> &mut [Cell]
pub fn copy_area_from(&mut self, other: &Buffer, area: Rect)
pub fn copy_from_at(&mut self, other: &Buffer, dst_x: usize, dst_y: usize)
pub fn changed_bounds(&self, other: &Buffer) -> Option<Rect>
pub fn merge_from(&mut self, other: &Buffer, x: usize, y: usize)
pub fn blend_cell(&mut self, x: usize, y: usize, cell: Cell)
pub fn resize(&mut self, width: usize, height: usize)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Buffer
impl RefUnwindSafe for Buffer
impl Send for Buffer
impl Sync for Buffer
impl Unpin for Buffer
impl UnsafeUnpin for Buffer
impl UnwindSafe for Buffer
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