pub enum FormatError {
Show 15 variants
WidthExceeded {
width: u32,
max: u32,
},
HeightExceeded {
height: u32,
max: u32,
},
DimensionOverflow {
width: u32,
height: u32,
},
CellCountMismatch {
actual: usize,
expected: usize,
width: u32,
height: u32,
},
FrameCellCountMismatch {
frame: usize,
actual: usize,
expected: usize,
},
FrameCountExceeded {
count: usize,
max: usize,
},
GlyphCharCountMismatch {
actual: usize,
expected: usize,
width: u32,
height: u32,
},
GlyphOpacityMismatch {
actual: usize,
expected: usize,
width: u32,
height: u32,
},
GlyphCountExceeded {
count: usize,
max: usize,
},
ZeroLineHeight,
AllocationOverflow,
AllocationExceeded {
requested: usize,
limit: usize,
},
PayloadTooLarge {
len: usize,
max: usize,
},
UnsupportedVersion {
format: &'static str,
found: u8,
min_supported: u8,
current: u8,
},
Decode(String),
}Expand description
Typed error for format validation and decoding.
Every fallible public API in this crate returns FormatError; consumers
can match on variants instead of parsing message strings (RELEASE_PLAN D2).
Variants§
WidthExceeded
HeightExceeded
DimensionOverflow
CellCountMismatch
FrameCellCountMismatch
FrameCountExceeded
GlyphCharCountMismatch
GlyphOpacityMismatch
GlyphCountExceeded
ZeroLineHeight
AllocationOverflow
AllocationExceeded
PayloadTooLarge
UnsupportedVersion
Decode(String)
Underlying MessagePack decode failure (truncated/corrupt input).
Carries the codec’s message; the codec error type itself is not Clone.
Trait Implementations§
Source§impl Clone for FormatError
impl Clone for FormatError
Source§fn clone(&self) -> FormatError
fn clone(&self) -> FormatError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FormatError
impl Debug for FormatError
Source§impl Display for FormatError
impl Display for FormatError
impl Eq for FormatError
Source§impl Error for FormatError
impl Error for FormatError
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<FormatError> for Error
impl From<FormatError> for Error
Source§fn from(source: FormatError) -> Self
fn from(source: FormatError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FormatError
impl PartialEq for FormatError
Source§fn eq(&self, other: &FormatError) -> bool
fn eq(&self, other: &FormatError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FormatError
Auto Trait Implementations§
impl Freeze for FormatError
impl RefUnwindSafe for FormatError
impl Send for FormatError
impl Sync for FormatError
impl Unpin for FormatError
impl UnsafeUnpin for FormatError
impl UnwindSafe for FormatError
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