#[non_exhaustive]pub enum TextError {
InvalidAtlasLimits,
ForeignFont,
Font(FontError),
Prepared(ShapedLineError),
FontLimitExceeded {
limit: usize,
},
FontByteLimitExceeded {
limit: usize,
retained: usize,
incoming: usize,
},
RunBudgetExceeded {
glyphs: usize,
max_glyphs: usize,
required_bytes: usize,
max_retained_bytes: usize,
},
Screen(ScreenVisualError),
InvalidBounds {
position: LogicalScreenPosition,
},
AllocationFailed {
source: TryReserveError,
},
}Expand description
Rejected font registration or label change; prior published values survive.
Font parsing, shaping, and owned vector reservation happen before a new label or registration is installed. As elsewhere in Rust, shared-handle control-block allocation and dependency internals are not an OOM sandbox.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidAtlasLimits
Invalid atlas dimensions/cache count or run count/byte limits.
ForeignFont
A style was requested from a font registered by another application.
Font(FontError)
Engine rejected trusted font bytes, single-line input, or font geometry.
Prepared(ShapedLineError)
Prepared shaping state belongs to a different font/style or exceeds limits.
FontLimitExceeded
The application has reached its fixed registration-count limit.
FontByteLimitExceeded
Source Vec capacity would exceed the application’s total font budget.
Fields
RunBudgetExceeded
Shaped glyphs cannot fit the configured desktop run even before rasterization.
Fields
Screen(ScreenVisualError)
Position, tint, or draw-order depth is invalid.
InvalidBounds
Aligned baseline or typographic bounds overflow or lose nonzero extent.
Fields
position: LogicalScreenPositionRequested logical baseline anchor before alignment.
AllocationFailed
Owned string or registry metadata could not be reserved before publication.
Fields
source: TryReserveErrorOriginal fallible allocator error.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ScreenVisualError> for TextError
impl From<ScreenVisualError> for TextError
Source§fn from(error: ScreenVisualError) -> Self
fn from(error: ScreenVisualError) -> Self
Source§impl From<ShapedLineError> for TextError
impl From<ShapedLineError> for TextError
Source§fn from(error: ShapedLineError) -> Self
fn from(error: ShapedLineError) -> Self
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.