#[non_exhaustive]pub enum ParagraphError {
InvalidSize(f32),
InvalidWidth(f32),
InvalidSpan(Range<usize>),
InvalidRange(Range<usize>),
UnreadableFont,
}Expand description
Why a paragraph could not be laid out.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidSize(f32)
A font size outside (0, MAX_FONT_PX], or a line height outside
(0, MAX_LINE_HEIGHT].
InvalidWidth(f32)
The maximum width is not a finite, non-negative number.
InvalidSpan(Range<usize>)
A span’s range is reversed, outside the text, or splits a character.
InvalidRange(Range<usize>)
A byte range (such as an input method’s cursor in its preedit text) is reversed, outside its text, or splits a character.
UnreadableFont
The shaper chose a font whose data cannot be read for drawing.
Trait Implementations§
Source§impl Clone for ParagraphError
impl Clone for ParagraphError
Source§impl Debug for ParagraphError
impl Debug for ParagraphError
Source§impl Display for ParagraphError
impl Display for ParagraphError
Source§impl Error for ParagraphError
impl Error for ParagraphError
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 PartialEq for ParagraphError
impl PartialEq for ParagraphError
impl StructuralPartialEq for ParagraphError
Auto Trait Implementations§
impl Freeze for ParagraphError
impl RefUnwindSafe for ParagraphError
impl Send for ParagraphError
impl Sync for ParagraphError
impl Unpin for ParagraphError
impl UnsafeUnpin for ParagraphError
impl UnwindSafe for ParagraphError
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