pub struct StyledBuffer {
    lines: Vec<Vec<StyledChar>>,
}

Fields§

§lines: Vec<Vec<StyledChar>>

Implementations§

Returns content of StyledBuffer split by lines and line styles

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.

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.

For given line inserts string with style before old content of that line, adding lines if needed

For given line inserts string with style after old content of that line, adding lines if needed

Set style for line, col_start..col_end range if:

  1. That line and column range exist in StyledBuffer
  2. overwrite is true or existing style is Style::NoStyle or Style::Quotation

Set style for line, col if:

  1. That line and column exist in StyledBuffer
  2. overwrite is true or existing style is Style::NoStyle or Style::Quotation

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 24 bytes