pub enum GlyphError {
Image(ImageError),
InvalidBudget,
EntryBudgetExceeded {
limit: usize,
actual: usize,
},
MetadataBudgetExceeded {
limit: usize,
actual: usize,
},
DuplicateGlyph {
glyph: GlyphId,
},
OverlappingGlyph {
glyph: GlyphId,
conflicting_glyph: GlyphId,
},
MissingGlyph {
glyph: GlyphId,
index: usize,
},
InvalidGlyph,
AllocationFailed {
requested_bytes: usize,
},
}Expand description
Failure while constructing, updating, or restoring glyph resources.
Variants§
Image(ImageError)
Image creation, update, ownership, or capacity validation failed.
InvalidBudget
A glyph budget must fit at least one entry or positioned glyph.
EntryBudgetExceeded
Atlas or run metadata exceeded its configured entry limit.
MetadataBudgetExceeded
Atlas or run recovery metadata exceeded its configured byte limit.
DuplicateGlyph
Two atlas entries use the same glyph identity.
OverlappingGlyph
Two distinct glyph identities claim overlapping atlas texels.
Fields
MissingGlyph
A positioned run references a glyph absent from its atlas.
Fields
InvalidGlyph
A glyph destination, tint, or atlas rectangle is invalid.
AllocationFailed
CPU storage for retained metadata or temporary validation/conversion scratch could not be reserved.
Trait Implementations§
Source§impl Clone for GlyphError
impl Clone for GlyphError
Source§fn clone(&self) -> GlyphError
fn clone(&self) -> GlyphError
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 GlyphError
Source§impl Debug for GlyphError
impl Debug for GlyphError
Source§impl Display for GlyphError
impl Display for GlyphError
impl Eq for GlyphError
Source§impl Error for GlyphError
impl Error for GlyphError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<GlyphError> for TextError
impl From<GlyphError> for TextError
Source§fn from(error: GlyphError) -> Self
fn from(error: GlyphError) -> Self
Converts to this type from the input type.
Source§impl From<ImageError> for GlyphError
impl From<ImageError> for GlyphError
Source§fn from(error: ImageError) -> Self
fn from(error: ImageError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for GlyphError
impl PartialEq for GlyphError
impl StructuralPartialEq for GlyphError
Auto Trait Implementations§
impl Freeze for GlyphError
impl RefUnwindSafe for GlyphError
impl Send for GlyphError
impl Sync for GlyphError
impl Unpin for GlyphError
impl UnsafeUnpin for GlyphError
impl UnwindSafe for GlyphError
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.