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>) -> NativeMenuCommand
pub fn with_shortcut(self, shortcut: Shortcut) -> NativeMenuCommand
pub fn with_enabled(self, enabled: bool) -> NativeMenuCommand
pub fn with_checked(self, checked: bool) -> NativeMenuCommand
Trait Implementations§
Source§impl Clone for NativeMenuCommand
impl Clone for NativeMenuCommand
Source§fn clone(&self) -> NativeMenuCommand
fn clone(&self) -> NativeMenuCommand
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 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) -> NativeMenuItem
fn from(command: NativeMenuCommand) -> NativeMenuItem
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 Forget for NativeMenuCommand
impl Freeze for NativeMenuCommand
impl Move 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.