pub struct CellCluster {
    pub attrs: CellAttributes,
    pub text: String,
    pub width: usize,
    pub presentation: Presentation,
    pub direction: Direction,
    pub first_cell_idx: usize,
    /* private fields */
}
Expand description

A CellCluster is another representation of a Line. A Vec<CellCluster> is produced by walking through the Cells in a line and collecting succesive Cells with the same attributes together into a CellCluster instance. Additional metadata to aid in font rendering is also collected.

Fields

attrs: CellAttributestext: Stringwidth: usizepresentation: Presentationdirection: Directionfirst_cell_idx: usize

Implementations

Given a byte index into self.text, return the corresponding cell index in the originating line.

Compute the list of CellClusters from a set of visible cells. The input is typically the result of calling Line::visible_cells().

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.