[][src]Struct image2ascii::Char2DArray

pub struct Char2DArray {
    pub buffer: Vec<Vec<char>>,
    // some fields omitted
}

2-d array of chars

Fields

buffer: Vec<Vec<char>>

2-d array of chars by Vec

Implementations

impl Char2DArray[src]

pub fn new(width: usize, height: usize) -> Char2DArray[src]

create Char2DArray create Char2DArray and initialize value by ' '

pub fn debug_print(&self)[src]

pub fn from(src: Vec<Vec<char>>) -> Char2DArray[src]

create Char2DArray from Vec<Vec>

pub fn to_lines(&self) -> Vec<String>[src]

conver to Vec

pub fn save(&self, save_file: &str) -> Result<()>[src]

save to file

pub fn height(&self) -> usize[src]

get number of lines

pub fn width(&self) -> usize[src]

get number of rows

pub fn overwrite_rect(
    &mut self,
    rect: &Char2DArray,
    position: CharPosition,
    transparent: Option<char>
)
[src]

overwrite data by another Char2DArray

pub fn overwrite_rect_center(
    &mut self,
    rect: &Char2DArray,
    position: CharPosition,
    transparent: Option<char>
)
[src]

pub fn overwrite_line(&mut self, ch: char, line_index: usize)[src]

pub fn overwrite_char(&mut self, ch: char, position: CharPosition)[src]

pub fn overwrite_char_all(&mut self, ch: char)[src]

pub fn copy_from(&mut self, src: &Char2DArray)[src]

pub fn overwrite_fn<F: Fn(usize, usize, char) -> bool>(
    &mut self,
    ch: char,
    f: F
)
[src]

pub fn overwrite_random_fn<F: Fn(usize, usize, char) -> bool>(
    &mut self,
    chars: Vec<char>,
    f: F
)
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,