pub struct TextSegment {
pub text: String,
pub byte_range: Range<usize>,
pub char_range: Range<usize>,
pub line_breaks: Vec<LineBreakOpportunity>,
pub word_breaks: Vec<WordBreakOpportunity>,
}Fields§
§text: String§byte_range: Range<usize>§char_range: Range<usize>§line_breaks: Vec<LineBreakOpportunity>§word_breaks: Vec<WordBreakOpportunity>Trait Implementations§
Source§impl Clone for TextSegment
impl Clone for TextSegment
Source§fn clone(&self) -> TextSegment
fn clone(&self) -> TextSegment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextSegment
impl Debug for TextSegment
Source§impl Default for TextSegment
impl Default for TextSegment
Source§fn default() -> TextSegment
fn default() -> TextSegment
Returns the “default value” for a type. Read more
Source§impl PartialEq for TextSegment
impl PartialEq for TextSegment
Source§fn eq(&self, other: &TextSegment) -> bool
fn eq(&self, other: &TextSegment) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for TextSegment
impl StructuralPartialEq for TextSegment
Auto Trait Implementations§
impl Freeze for TextSegment
impl RefUnwindSafe for TextSegment
impl Send for TextSegment
impl Sync for TextSegment
impl Unpin for TextSegment
impl UnsafeUnpin for TextSegment
impl UnwindSafe for TextSegment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more