pub struct FontBudget { /* private fields */ }Expand description
Limits checked before taking ownership of a parsed font. Parser-owned metadata and allocator overhead are not included in source bytes.
Implementations§
Source§impl FontBudget
impl FontBudget
Sourcepub const fn new(max_font_bytes: usize, max_font_glyphs: usize) -> Self
pub const fn new(max_font_bytes: usize, max_font_glyphs: usize) -> Self
Creates exact limits. Zero is valid and rejects nonempty resources.
Sourcepub const fn max_font_bytes(self) -> usize
pub const fn max_font_bytes(self) -> usize
Maximum source Vec capacity in bytes, not merely its initialized length.
Sourcepub const fn max_font_glyphs(self) -> usize
pub const fn max_font_glyphs(self) -> usize
Maximum number of glyph entries in the selected font face.
Trait Implementations§
Source§impl Clone for FontBudget
impl Clone for FontBudget
Source§fn clone(&self) -> FontBudget
fn clone(&self) -> FontBudget
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 moreimpl Copy for FontBudget
Source§impl Debug for FontBudget
impl Debug for FontBudget
Source§impl Default for FontBudget
impl Default for FontBudget
impl Eq for FontBudget
Source§impl PartialEq for FontBudget
impl PartialEq for FontBudget
impl StructuralPartialEq for FontBudget
Auto Trait Implementations§
impl Freeze for FontBudget
impl RefUnwindSafe for FontBudget
impl Send for FontBudget
impl Sync for FontBudget
impl Unpin for FontBudget
impl UnsafeUnpin for FontBudget
impl UnwindSafe for FontBudget
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.