#[non_exhaustive]pub enum MenuBarRole {
File,
Edit,
View,
Settings,
Window,
Help,
}Expand description
A standard menu-bar slot (macOS’s File/Edit/View/Window/Help, and their counterparts elsewhere). A backend that has a house style for the menu bar fills every slot an app did not claim with its own stock menu, so an app never has to restate the platform’s furniture — and can still replace any of it by tagging its own submenu with the matching role.
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.
File
Edit
View
Settings
KDE/Plasma’s Settings menu (Configure
Window
macOS’s Window menu. Windows and Linux desktops do not have one.
Help
Trait Implementations§
Source§impl Clone for MenuBarRole
impl Clone for MenuBarRole
Source§fn clone(&self) -> MenuBarRole
fn clone(&self) -> MenuBarRole
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 MenuBarRole
impl Debug for MenuBarRole
Source§impl PartialEq for MenuBarRole
impl PartialEq for MenuBarRole
Source§fn eq(&self, other: &MenuBarRole) -> bool
fn eq(&self, other: &MenuBarRole) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for MenuBarRole
impl Eq for MenuBarRole
impl StructuralPartialEq for MenuBarRole
Auto Trait Implementations§
impl Freeze for MenuBarRole
impl RefUnwindSafe for MenuBarRole
impl Send for MenuBarRole
impl Sync for MenuBarRole
impl Unpin for MenuBarRole
impl UnsafeUnpin for MenuBarRole
impl UnwindSafe for MenuBarRole
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