pub struct NativeMenuCommand {
pub id: u64,
pub label: String,
pub shortcut: Option<Shortcut>,
pub enabled: bool,
pub checked: Option<bool>,
}Expand description
原生菜单命令。
Fields§
§id: u64§label: String§shortcut: Option<Shortcut>§enabled: bool§checked: Option<bool>None = 普通项;Some = 可勾选项及初始状态。
Implementations§
Source§impl NativeMenuCommand
impl NativeMenuCommand
pub fn new(id: u64, label: impl Into<String>) -> Self
pub fn with_shortcut(self, shortcut: Shortcut) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
pub fn with_checked(self, checked: bool) -> Self
Trait Implementations§
Source§impl Clone for NativeMenuCommand
impl Clone for NativeMenuCommand
Source§impl Debug for NativeMenuCommand
impl Debug for NativeMenuCommand
impl Eq for NativeMenuCommand
Source§impl From<NativeMenuCommand> for NativeMenuItem
impl From<NativeMenuCommand> for NativeMenuItem
Source§fn from(command: NativeMenuCommand) -> Self
fn from(command: NativeMenuCommand) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NativeMenuCommand
impl PartialEq for NativeMenuCommand
impl StructuralPartialEq for NativeMenuCommand
Auto Trait Implementations§
impl Freeze for NativeMenuCommand
impl RefUnwindSafe for NativeMenuCommand
impl Send for NativeMenuCommand
impl Sync for NativeMenuCommand
impl Unpin for NativeMenuCommand
impl UnsafeUnpin for NativeMenuCommand
impl UnwindSafe for NativeMenuCommand
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