Expand description
A list of segments representing a row of text
Fields
segments: Vec<Segment, Global>
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
sourceimpl Row
impl Row
sourcepub fn resolve<'a, T, S>(&self, source: S) -> Vec<Span<'a, T>, Global>where
S: Into<SpannedStr<'a, T>>,
pub fn resolve<'a, T, S>(&self, source: S) -> Vec<Span<'a, T>, Global>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.
Trait Implementations
sourceimpl PartialEq<Row> for Row
impl PartialEq<Row> for Row
impl Eq for Row
impl StructuralEq for Row
impl StructuralPartialEq for Row
Auto Trait Implementations
impl RefUnwindSafe for Row
impl Send for Row
impl Sync for Row
impl Unpin for Row
impl UnwindSafe for Row
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more