pub struct PersistentTextLayout { /* private fields */ }Implementations§
Source§impl PersistentTextLayout
impl PersistentTextLayout
pub fn new(handle: TextLayoutHandle, layout: TextLayout) -> PersistentTextLayout
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
pub fn glyph_instance(&self, glyph_index: usize) -> TextGlyphInstance<'_>
pub fn glyph_instances(&self) -> impl ExactSizeIterator
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§fn clone(&self) -> PersistentTextLayout
fn clone(&self) -> PersistentTextLayout
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 PersistentTextLayout
impl Debug for PersistentTextLayout
Source§impl Deref for PersistentTextLayout
impl Deref for PersistentTextLayout
Source§type Target = TextLayout
type Target = TextLayout
The resulting type after dereferencing.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.