pub enum MenuError {
BadStandardLabel(&'static str),
BadMenuTitle,
BadItemLabel,
TooManyMenus,
BadItemCount,
BadId,
DuplicateId,
EmptyAccelerator,
BadModifier,
BadKey,
ReservedAccelerator,
DuplicateAccelerator,
}Expand description
What the page sent that the menu refuses. Standard labels are named by their field; anything else the page wrote (an id, a title, a shortcut) is never repeated.
Variants§
BadStandardLabel(&'static str)
A standard label (the field’s name) is empty, too long or holds a control character.
BadMenuTitle
BadItemLabel
TooManyMenus
BadItemCount
A menu has no item, or more than MAX_ITEMS.
BadId
DuplicateId
EmptyAccelerator
BadModifier
BadKey
ReservedAccelerator
The shortcut belongs to a standard menu.
DuplicateAccelerator
Implementations§
Trait Implementations§
impl Copy for MenuError
impl Eq for MenuError
Source§impl Error for MenuError
impl Error for MenuError
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()
impl StructuralPartialEq for MenuError
Auto Trait Implementations§
impl Freeze for MenuError
impl RefUnwindSafe for MenuError
impl Send for MenuError
impl Sync for MenuError
impl Unpin for MenuError
impl UnsafeUnpin for MenuError
impl UnwindSafe for MenuError
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