pub struct NativeMenu {
pub title: String,
pub items: Vec<NativeMenuItem>,
}Expand description
一个顶层下拉菜单(如 File / Edit)。
Fields§
§title: String§items: Vec<NativeMenuItem>Implementations§
Source§impl NativeMenu
impl NativeMenu
pub fn new(title: impl Into<String>) -> NativeMenu
pub fn with_item(self, item: impl Into<NativeMenuItem>) -> NativeMenu
pub fn with_separator(self) -> NativeMenu
Trait Implementations§
Source§impl Clone for NativeMenu
impl Clone for NativeMenu
Source§fn clone(&self) -> NativeMenu
fn clone(&self) -> NativeMenu
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 NativeMenu
impl Debug for NativeMenu
impl Eq for NativeMenu
Source§impl From<NativeMenu> for NativeMenuItem
impl From<NativeMenu> for NativeMenuItem
Source§fn from(menu: NativeMenu) -> NativeMenuItem
fn from(menu: NativeMenu) -> NativeMenuItem
Converts to this type from the input type.
Source§impl PartialEq for NativeMenu
impl PartialEq for NativeMenu
impl StructuralPartialEq for NativeMenu
Auto Trait Implementations§
impl Freeze for NativeMenu
impl RefUnwindSafe for NativeMenu
impl Send for NativeMenu
impl Sync for NativeMenu
impl Unpin for NativeMenu
impl UnsafeUnpin for NativeMenu
impl UnwindSafe for NativeMenu
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.