pub struct PersistentTextLayout { /* private fields */ }Implementations§
Source§impl PersistentTextLayout
impl PersistentTextLayout
pub fn new(handle: TextLayoutHandle, layout: TextLayout) -> Self
pub fn handle(&self) -> TextLayoutHandle
pub fn version(&self) -> TextLayoutVersion
pub fn metadata(&self) -> TextLayoutMetadata
pub fn layout(&self) -> &TextLayout
pub fn into_parts(self) -> (TextLayoutHandle, TextLayout)
Methods from Deref<Target = TextLayout>§
pub fn id(&self) -> TextLayoutId
pub fn version(&self) -> TextLayoutVersion
pub fn metadata(&self) -> TextLayoutMetadata
pub fn text(&self) -> &str
pub fn document(&self) -> &TextDocument
pub fn style(&self) -> &TextStyle
pub fn box_size(&self) -> Size
pub fn measurement(&self) -> TextMeasurement
pub fn paragraphs(&self) -> &[TextParagraphLayout]
pub fn lines(&self) -> &[TextLine]
pub fn runs(&self) -> &[TextLayoutRun]
pub fn clusters(&self) -> &[TextCluster]
pub fn glyphs(&self) -> &[ShapedGlyph]
pub fn faces(&self) -> &[ResolvedTextFace]
pub fn view(&self) -> TextLayoutView<'_>
pub fn run_style(&self, run_index: usize) -> &TextStyle
pub fn run_face(&self, run_index: usize) -> &ResolvedTextFace
pub fn glyph_style(&self, glyph: &ShapedGlyph) -> &TextStyle
pub fn glyph_face(&self, glyph: &ShapedGlyph) -> &ResolvedTextFace
pub fn run_view(&self, run_index: usize) -> TextRunView<'_>
pub fn run_views(&self) -> impl ExactSizeIterator<Item = TextRunView<'_>> + '_
pub fn glyph_instance(&self, glyph_index: usize) -> TextGlyphInstance<'_>
pub fn glyph_instances( &self, ) -> impl ExactSizeIterator<Item = TextGlyphInstance<'_>> + '_
pub fn line_window(&self, line_range: Range<usize>) -> TextLineWindow<'_>
pub fn caret(&self, cursor: TextCursor) -> TextCaret
pub fn caret_rect(&self, utf8_offset: usize) -> Rect
pub fn hit_test_point(&self, point: Point) -> TextCursor
pub fn selection_geometry( &self, selection: &TextSelection, ) -> TextSelectionGeometry
pub fn selection_rects(&self, range: Range<usize>) -> Vec<Rect>
pub fn selection_bounds(&self, range: Range<usize>) -> Option<Rect>
Trait Implementations§
Source§impl AsRef<TextLayout> for PersistentTextLayout
impl AsRef<TextLayout> for PersistentTextLayout
Source§fn as_ref(&self) -> &TextLayout
fn as_ref(&self) -> &TextLayout
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for PersistentTextLayout
impl Clone for PersistentTextLayout
Source§impl Debug for PersistentTextLayout
impl Debug for PersistentTextLayout
Source§impl Deref for PersistentTextLayout
impl Deref for PersistentTextLayout
Source§impl PartialEq for PersistentTextLayout
impl PartialEq for PersistentTextLayout
impl StructuralPartialEq for PersistentTextLayout
Auto Trait Implementations§
impl Freeze for PersistentTextLayout
impl RefUnwindSafe for PersistentTextLayout
impl Send for PersistentTextLayout
impl Sync for PersistentTextLayout
impl Unpin for PersistentTextLayout
impl UnsafeUnpin for PersistentTextLayout
impl UnwindSafe for PersistentTextLayout
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