pub enum NativeShapingError {
ContextBudgetExceeded {
length: usize,
max_allowed: usize,
},
EmptyText,
InvalidByteRange {
offset: usize,
text_len: usize,
},
MidScalarBoundary {
offset: usize,
},
FallbackRequired {
unshaped_byte_offset: usize,
},
PlatformUnavailable(String),
AdapterError(String),
}Expand description
Errors arising from native shaping operations.
Variants§
ContextBudgetExceeded
The input text exceeds the maximum allowable context budget for a single call (Plan §10.9).
Fields
EmptyText
The input text was empty.
InvalidByteRange
An offset was out of bounds for the input text.
MidScalarBoundary
An offset fell within a UTF-8 scalar sequence rather than on a scalar boundary.
FallbackRequired
The text contains characters missing from the primary font, but system fallback was disabled.
The native platform bridge or required system framework is unavailable.
AdapterError(String)
The platform shaper reported an internal error during layout.
Trait Implementations§
Source§impl Clone for NativeShapingError
impl Clone for NativeShapingError
Source§impl Debug for NativeShapingError
impl Debug for NativeShapingError
Source§impl Display for NativeShapingError
impl Display for NativeShapingError
impl Eq for NativeShapingError
Source§impl Error for NativeShapingError
impl Error for NativeShapingError
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<MacFontAdapterError> for NativeShapingError
impl From<MacFontAdapterError> for NativeShapingError
Source§fn from(err: MacFontAdapterError) -> Self
fn from(err: MacFontAdapterError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NativeShapingError
impl PartialEq for NativeShapingError
impl StructuralPartialEq for NativeShapingError
Auto Trait Implementations§
impl Freeze for NativeShapingError
impl RefUnwindSafe for NativeShapingError
impl Send for NativeShapingError
impl Sync for NativeShapingError
impl Unpin for NativeShapingError
impl UnsafeUnpin for NativeShapingError
impl UnwindSafe for NativeShapingError
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