pub enum Role {
Show 17 variants
About,
Services,
Hide,
HideOthers,
ShowAll,
Quit,
CloseWindow,
Minimize,
Zoom,
Fullscreen,
BringAllToFront,
Undo,
Redo,
Cut,
Copy,
Paste,
SelectAll,
}Expand description
Items the OS performs itself (no command dispatch). Edit roles (Undo … SelectAll) go to
the OS’s focused native control (a web view, a native text field); apps that draw their own
text fields use plain items for those instead. Renderers leave out roles their platform lacks
(an in-window menu bar draws none).
Variants§
About
The standard About panel (name and version from the bundle).
Services
macOS Services submenu.
Hide
HideOthers
ShowAll
Quit
Quit at once. Apps with unsaved documents use a plain app.quit item instead and ask first.
CloseWindow
Minimize
Zoom
Fullscreen
BringAllToFront
Undo
Redo
Cut
Copy
Paste
SelectAll
Trait Implementations§
impl Copy for Role
Source§impl<'de> Deserialize<'de> for Role
impl<'de> Deserialize<'de> for Role
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Role, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Role, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Role
Source§impl Serialize for Role
impl Serialize for Role
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Role
impl UnwindSafe for Role
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