pub struct LayoutScratch<const RUNS: usize, const GLYPHS: usize, const LINES: usize, const CARETS: usize> { /* private fields */ }Expand description
Fixed-capacity storage for allocation-free paragraph layout.
RUNS bounds bidi, script, fallback, and visual runs. GLYPHS bounds both
intermediate and positioned glyphs. LINES bounds wrapped lines, and
CARETS bounds emitted caret stops. The storage is reusable and performs
no allocation during crate::TextFlow::layout_with_scratch.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<const RUNS: usize, const GLYPHS: usize, const LINES: usize, const CARETS: usize> Forget for LayoutScratch<RUNS, GLYPHS, LINES, CARETS>
impl<const RUNS: usize, const GLYPHS: usize, const LINES: usize, const CARETS: usize> Freeze for LayoutScratch<RUNS, GLYPHS, LINES, CARETS>
impl<const RUNS: usize, const GLYPHS: usize, const LINES: usize, const CARETS: usize> RefUnwindSafe for LayoutScratch<RUNS, GLYPHS, LINES, CARETS>where
[BidiRun; RUNS]: RefUnwindSafe,
[LogicalRun; RUNS]: RefUnwindSafe,
[ShapedGlyph; GLYPHS]: RefUnwindSafe,
[GlyphRun; RUNS]: RefUnwindSafe,
[BrokenLine; LINES]: RefUnwindSafe,
[PositionedGlyph; GLYPHS]: RefUnwindSafe,
[VisualRun; RUNS]: RefUnwindSafe,
[LayoutLine; LINES]: RefUnwindSafe,
[CaretStop; CARETS]: RefUnwindSafe,
impl<const RUNS: usize, const GLYPHS: usize, const LINES: usize, const CARETS: usize> Send for LayoutScratch<RUNS, GLYPHS, LINES, CARETS>
impl<const RUNS: usize, const GLYPHS: usize, const LINES: usize, const CARETS: usize> Sync for LayoutScratch<RUNS, GLYPHS, LINES, CARETS>
impl<const RUNS: usize, const GLYPHS: usize, const LINES: usize, const CARETS: usize> Unpin for LayoutScratch<RUNS, GLYPHS, LINES, CARETS>
impl<const RUNS: usize, const GLYPHS: usize, const LINES: usize, const CARETS: usize> UnsafeUnpin for LayoutScratch<RUNS, GLYPHS, LINES, CARETS>where
[BidiRun; RUNS]: UnsafeUnpin,
[LogicalRun; RUNS]: UnsafeUnpin,
[ShapedGlyph; GLYPHS]: UnsafeUnpin,
[GlyphRun; RUNS]: UnsafeUnpin,
[BrokenLine; LINES]: UnsafeUnpin,
[PositionedGlyph; GLYPHS]: UnsafeUnpin,
[VisualRun; RUNS]: UnsafeUnpin,
[LayoutLine; LINES]: UnsafeUnpin,
[CaretStop; CARETS]: UnsafeUnpin,
impl<const RUNS: usize, const GLYPHS: usize, const LINES: usize, const CARETS: usize> UnwindSafe for LayoutScratch<RUNS, GLYPHS, LINES, CARETS>where
[BidiRun; RUNS]: UnwindSafe,
[LogicalRun; RUNS]: UnwindSafe,
[ShapedGlyph; GLYPHS]: UnwindSafe,
[GlyphRun; RUNS]: UnwindSafe,
[BrokenLine; LINES]: UnwindSafe,
[PositionedGlyph; GLYPHS]: UnwindSafe,
[VisualRun; RUNS]: UnwindSafe,
[LayoutLine; LINES]: UnwindSafe,
[CaretStop; CARETS]: UnwindSafe,
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