pub struct GlyphAtlasBudget { /* private fields */ }Expand description
Image and metadata limits retained with a GlyphAtlas2d.
Implementations§
Source§impl GlyphAtlasBudget
impl GlyphAtlasBudget
Sourcepub fn new(
image: ImageBudget,
max_entries: usize,
max_metadata_bytes: usize,
) -> Result<Self, GlyphError>
pub fn new( image: ImageBudget, max_entries: usize, max_metadata_bytes: usize, ) -> Result<Self, GlyphError>
Creates non-zero image, entry-count, and metadata-byte limits.
Sourcepub const fn image(self) -> ImageBudget
pub const fn image(self) -> ImageBudget
Returns the atlas image limits.
Sourcepub const fn max_entries(self) -> usize
pub const fn max_entries(self) -> usize
Returns the maximum registered glyph count.
Sourcepub const fn max_metadata_bytes(self) -> usize
pub const fn max_metadata_bytes(self) -> usize
Returns the maximum retained glyph-metadata bytes.
Trait Implementations§
Source§impl Clone for GlyphAtlasBudget
impl Clone for GlyphAtlasBudget
impl Copy for GlyphAtlasBudget
Source§impl Debug for GlyphAtlasBudget
impl Debug for GlyphAtlasBudget
Source§impl Default for GlyphAtlasBudget
impl Default for GlyphAtlasBudget
impl Eq for GlyphAtlasBudget
Source§impl PartialEq for GlyphAtlasBudget
impl PartialEq for GlyphAtlasBudget
impl StructuralPartialEq for GlyphAtlasBudget
Auto Trait Implementations§
impl Freeze for GlyphAtlasBudget
impl RefUnwindSafe for GlyphAtlasBudget
impl Send for GlyphAtlasBudget
impl Sync for GlyphAtlasBudget
impl Unpin for GlyphAtlasBudget
impl UnsafeUnpin for GlyphAtlasBudget
impl UnwindSafe for GlyphAtlasBudget
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.