pub enum InflateError {
UnknownWidget(String),
UnknownProp {
widget: String,
prop: String,
},
PropType {
widget: String,
prop: String,
expected: &'static str,
},
UnexpectedChildren {
widget: String,
},
HoleOutOfRange {
index: usize,
len: usize,
},
}Expand description
Why an inflate failed. All are “escalate, don’t paint garbage” cases.
Variants§
UnknownWidget(String)
No registered widget for this name.
UnknownProp
A registered widget got a prop it doesn’t understand.
PropType
A prop’s value was the wrong type for the setter (e.g. a closure where
an f32 was expected) — the slot-signature mismatch guard in miniature.
UnexpectedChildren
A leaf widget was given children it can’t hold.
HoleOutOfRange
A Hole(i) referenced a slot past the end of the supplied hole array.
Trait Implementations§
Source§impl Clone for InflateError
impl Clone for InflateError
Source§fn clone(&self) -> InflateError
fn clone(&self) -> InflateError
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 InflateError
impl Debug for InflateError
Source§impl Display for InflateError
impl Display for InflateError
impl Eq for InflateError
Source§impl Error for InflateError
impl Error for InflateError
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 InflateError
impl PartialEq for InflateError
impl StructuralPartialEq for InflateError
Auto Trait Implementations§
impl Freeze for InflateError
impl RefUnwindSafe for InflateError
impl Send for InflateError
impl Sync for InflateError
impl Unpin for InflateError
impl UnsafeUnpin for InflateError
impl UnwindSafe for InflateError
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