Expand description
A list of segments representing a row of text
Fields§
§segments: Vec<Segment>
List of segments
width: usize
Total width for this row
is_wrapped: bool
Whether or not this text was wrapped onto the next line
Implementations§
source§impl Row
impl Row
sourcepub fn resolve<'a, T, S>(&self, source: S) -> Vec<Span<'a, T>>where
S: Into<SpannedStr<'a, T>>,
pub fn resolve<'a, T, S>(&self, source: S) -> Vec<Span<'a, T>>where
S: Into<SpannedStr<'a, T>>,
Resolve the row indices into string slices and attributes.
sourcepub fn overall_indices<S>(&self, spans: &[S]) -> Option<(usize, usize)>where
S: AsRef<IndexedCow>,
pub fn overall_indices<S>(&self, spans: &[S]) -> Option<(usize, usize)>where
S: AsRef<IndexedCow>,
Returns indices in the source string, if possible.
Returns overall (start, end)
, or None
if the segments are owned.