pub enum TextError {
Font(FontError),
Glyph(GlyphError),
InvalidBudget,
AtlasFull,
GlyphCacheFull,
AtlasMismatch,
InvalidPlacement,
AllocationFailed,
}Expand description
A rejected text asset, layout, cache operation or GPU resource operation.
Variants§
Font(FontError)
Font parsing, shaping or rasterization failed its validation or work limits.
Glyph(GlyphError)
The underlying glyph/image allocation or identity contract was violated.
InvalidBudget
Atlas dimensions/counts or their checked byte calculation are invalid.
AtlasFull
The fixed shelf-packed atlas cannot fit a new padded glyph.
GlyphCacheFull
The fixed number of cached glyph identities has been reached.
AtlasMismatch
A run belongs to another font atlas, even if both use the same font bytes.
InvalidPlacement
Bitmap bearings or positioned glyph coordinates cannot form a finite logical quad.
AllocationFailed
An engine-owned CPU allocation could not be reserved.
Trait Implementations§
Source§impl Error for TextError
impl Error for TextError
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 TextError
impl From<ImageError> for TextError
Source§fn from(error: ImageError) -> Self
fn from(error: ImageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TextError
impl RefUnwindSafe for TextError
impl Send for TextError
impl Sync for TextError
impl Unpin for TextError
impl UnsafeUnpin for TextError
impl UnwindSafe for TextError
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