pub struct RichParagraph { /* private fields */ }Implementations§
Source§impl RichParagraph
impl RichParagraph
pub fn is_empty(&self) -> bool
pub fn len_chars(&self) -> usize
pub fn size(&self) -> Size
pub fn width(&self) -> f32
pub fn height(&self) -> f32
pub fn line_height(&self) -> f32
pub fn font_size(&self) -> f32
pub fn line_count(&self) -> usize
pub fn line(&self, index: usize) -> Option<&RichLine>
pub fn lines(&self) -> &[RichLine]
pub fn span_count(&self) -> usize
pub fn span_range(&self, span: usize) -> Option<Range<usize>>
pub fn span_at(&self, char_index: usize) -> Option<usize>
pub fn line_at(&self, char_index: usize) -> usize
pub fn caret_pos(&self, char_index: usize) -> RichCaret
pub fn hit_point(&self, x: f32, y: f32) -> RichHit
pub fn backgrounds(&self) -> &[RichRect]
pub fn decorations(&self) -> &[RichRect]
pub fn squiggles(&self) -> &[Squiggle]
pub fn squiggle_rects(&self) -> &[RichRect]
pub fn span_link(&self, span: usize) -> Option<&str>
pub fn span_mention(&self, span: usize) -> Option<u64>
pub fn span_is_code(&self, span: usize) -> bool
pub fn add_squiggle(&mut self, range: Range<usize>, color: Color)
pub fn glyph_count(&self) -> usize
pub fn glyph_span(&self, glyph: usize) -> Option<usize>
Trait Implementations§
Source§impl Clone for RichParagraph
impl Clone for RichParagraph
Source§fn clone(&self) -> RichParagraph
fn clone(&self) -> RichParagraph
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 moreAuto Trait Implementations§
impl Freeze for RichParagraph
impl RefUnwindSafe for RichParagraph
impl Send for RichParagraph
impl Sync for RichParagraph
impl Unpin for RichParagraph
impl UnsafeUnpin for RichParagraph
impl UnwindSafe for RichParagraph
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