pub struct Char2DArray {
pub buffer: Vec<Vec<char>>,
/* private fields */
}
Expand description
2-d array of chars
Fields§
§buffer: Vec<Vec<char>>
2-d array of chars by Vec
Implementations§
Source§impl Char2DArray
impl Char2DArray
Sourcepub fn new(width: usize, height: usize) -> Char2DArray
pub fn new(width: usize, height: usize) -> Char2DArray
create Char2DArray create Char2DArray and initialize value by ’ ’
pub fn debug_print(&self)
Sourcepub fn overwrite_rect(
&mut self,
rect: &Char2DArray,
position: CharPosition,
transparent: Option<char>,
)
pub fn overwrite_rect( &mut self, rect: &Char2DArray, position: CharPosition, transparent: Option<char>, )
overwrite data by another Char2DArray
pub fn overwrite_rect_center( &mut self, rect: &Char2DArray, position: CharPosition, transparent: Option<char>, )
pub fn overwrite_line(&mut self, ch: char, line_index: usize)
pub fn overwrite_char(&mut self, ch: char, position: CharPosition)
pub fn overwrite_char_all(&mut self, ch: char)
pub fn copy_from(&mut self, src: &Char2DArray)
pub fn overwrite_fn<F: Fn(usize, usize, char) -> bool>( &mut self, ch: char, f: F, )
pub fn overwrite_random_fn<F: Fn(usize, usize, char) -> bool>( &mut self, chars: Vec<char>, f: F, )
Auto Trait Implementations§
impl Freeze for Char2DArray
impl RefUnwindSafe for Char2DArray
impl Send for Char2DArray
impl Sync for Char2DArray
impl Unpin for Char2DArray
impl UnwindSafe for Char2DArray
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