pub struct ShapedText<'a> { /* private fields */ }Implementations§
Source§impl ShapedText<'_>
impl ShapedText<'_>
pub const fn text(&self) -> TextRange
pub const fn glyphs(&self) -> &[ShapedGlyph]
pub const fn runs(&self) -> &[GlyphRun]
pub fn run(&self, index: usize) -> Option<ShapedRun<'_>>
pub fn is_safe_break(&self, offset: u32) -> bool
pub fn break_into<'shaped, 'output>( &'shaped self, text: &str, max_width: i32, mode: WrapMode, spacing: TextSpacing, output: &'output mut [BrokenLine], ) -> Result<BrokenLines<'shaped, 'output>, LayoutError>
Sourcepub fn break_into_with<'shaped, 'output>(
&'shaped self,
text: &str,
max_width: i32,
mode: WrapMode,
spacing: TextSpacing,
provider: &dyn LineBreakProvider,
output: &'output mut [BrokenLine],
) -> Result<BrokenLines<'shaped, 'output>, LayoutError>
pub fn break_into_with<'shaped, 'output>( &'shaped self, text: &str, max_width: i32, mode: WrapMode, spacing: TextSpacing, provider: &dyn LineBreakProvider, output: &'output mut [BrokenLine], ) -> Result<BrokenLines<'shaped, 'output>, LayoutError>
Breaks shaped text with additional opportunities supplied by provider.
Auto Trait Implementations§
impl<'a> Freeze for ShapedText<'a>
impl<'a> RefUnwindSafe for ShapedText<'a>
impl<'a> Send for ShapedText<'a>
impl<'a> Sync for ShapedText<'a>
impl<'a> Unpin for ShapedText<'a>
impl<'a> UnsafeUnpin for ShapedText<'a>
impl<'a> UnwindSafe for ShapedText<'a>
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