pub struct GlyphRunBudget { /* private fields */ }Expand description
Retained glyph-run count and byte limits.
Implementations§
Source§impl GlyphRunBudget
impl GlyphRunBudget
Sourcepub const RETAINED_BYTES_PER_GLYPH: usize
pub const RETAINED_BYTES_PER_GLYPH: usize
CPU bytes per glyph capacity slot, including sprite and GPU conversion staging. Atlas storage and allocator metadata are excluded.
Sourcepub fn new(
max_glyphs: usize,
max_retained_bytes: usize,
) -> Result<Self, GlyphError>
pub fn new( max_glyphs: usize, max_retained_bytes: usize, ) -> Result<Self, GlyphError>
Creates non-zero limits for positioned glyphs and recovery metadata.
Sourcepub const fn max_glyphs(self) -> usize
pub const fn max_glyphs(self) -> usize
Returns the maximum number of submitted positioned glyphs.
Sourcepub const fn max_retained_bytes(self) -> usize
pub const fn max_retained_bytes(self) -> usize
Returns the maximum retained glyph, sprite and conversion-staging bytes.
Trait Implementations§
Source§impl Clone for GlyphRunBudget
impl Clone for GlyphRunBudget
impl Copy for GlyphRunBudget
Source§impl Debug for GlyphRunBudget
impl Debug for GlyphRunBudget
Source§impl Default for GlyphRunBudget
impl Default for GlyphRunBudget
impl Eq for GlyphRunBudget
Source§impl PartialEq for GlyphRunBudget
impl PartialEq for GlyphRunBudget
impl StructuralPartialEq for GlyphRunBudget
Auto Trait Implementations§
impl Freeze for GlyphRunBudget
impl RefUnwindSafe for GlyphRunBudget
impl Send for GlyphRunBudget
impl Sync for GlyphRunBudget
impl Unpin for GlyphRunBudget
impl UnsafeUnpin for GlyphRunBudget
impl UnwindSafe for GlyphRunBudget
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.