pub enum MacFontAdapterError {
ContextBudgetExceeded {
length: usize,
max_allowed: usize,
},
EmptyText,
InvalidUtf16Offset {
utf16_offset: usize,
},
MidScalarBoundary {
byte_offset: usize,
},
BridgeUnavailable(String),
ForeignCallFailed(String),
RasterDimensionTooLarge {
dimension: u32,
max_allowed: u32,
},
RasterBytesTooLarge {
bytes: usize,
max_allowed: usize,
},
RasterBufferMismatch {
expected: usize,
actual: usize,
},
FallbackDisabled {
unshaped_byte_offset: usize,
},
}Expand description
Errors occurring during Mac font adapter operations.
Variants§
ContextBudgetExceeded
Text exceeds the bounded work context budget (Plan §10.9).
EmptyText
Input text was empty.
InvalidUtf16Offset
UTF-16 code unit offset from CoreText could not be mapped to UTF-8 bytes.
MidScalarBoundary
Mapped byte offset fell inside a multi-byte UTF-8 scalar.
Native bridge failed or framework is unavailable.
ForeignCallFailed(String)
Foreign call execution failed.
RasterDimensionTooLarge
Raster dimension exceeded configured maximum.
RasterBytesTooLarge
Raster buffer memory size exceeded configured maximum.
RasterBufferMismatch
Raster buffer length does not match expected width * height * 4.
FallbackDisabled
Missing required fallback face when system fallback is disabled.
Trait Implementations§
Source§impl Clone for MacFontAdapterError
impl Clone for MacFontAdapterError
Source§impl Debug for MacFontAdapterError
impl Debug for MacFontAdapterError
Source§impl Display for MacFontAdapterError
impl Display for MacFontAdapterError
impl Eq for MacFontAdapterError
Source§impl Error for MacFontAdapterError
impl Error for MacFontAdapterError
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 MacFontAdapterError
impl PartialEq for MacFontAdapterError
impl StructuralPartialEq for MacFontAdapterError
Auto Trait Implementations§
impl Freeze for MacFontAdapterError
impl RefUnwindSafe for MacFontAdapterError
impl Send for MacFontAdapterError
impl Sync for MacFontAdapterError
impl Unpin for MacFontAdapterError
impl UnsafeUnpin for MacFontAdapterError
impl UnwindSafe for MacFontAdapterError
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