Struct rustc_errors::styled_buffer::StyledBuffer [−][src]
pub struct StyledBuffer {
lines: Vec<Vec<StyledChar>>,
}Fields
lines: Vec<Vec<StyledChar>>Implementations
impl StyledBuffer[src]
impl StyledBuffer[src]pub fn new() -> StyledBuffer[src]
pub fn render(&self) -> Vec<Vec<StyledString>>[src]
pub fn render(&self) -> Vec<Vec<StyledString>>[src]Returns content of StyledBuffer splitted by lines and line styles
fn ensure_lines(&mut self, line: usize)[src]
pub fn putc(&mut self, line: usize, col: usize, chr: char, style: Style)[src]
pub fn putc(&mut self, line: usize, col: usize, chr: char, style: Style)[src]Sets chr with style for given line, col.
If line does not exist in our buffer, adds empty lines up to the given
and fills the last line with unstyled whitespace.
pub fn puts(&mut self, line: usize, col: usize, string: &str, style: Style)[src]
pub fn puts(&mut self, line: usize, col: usize, string: &str, style: Style)[src]Sets string with style for given line, starting from col.
If line does not exist in our buffer, adds empty lines up to the given
and fills the last line with unstyled whitespace.
pub fn prepend(&mut self, line: usize, string: &str, style: Style)[src]
pub fn prepend(&mut self, line: usize, string: &str, style: Style)[src]For given line inserts string with style before old content of that line,
adding lines if needed
pub fn append(&mut self, line: usize, string: &str, style: Style)[src]
pub fn append(&mut self, line: usize, string: &str, style: Style)[src]For given line inserts string with style after old content of that line,
adding lines if needed