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>) -> Self
pub fn with_item(self, item: impl Into<NativeMenuItem>) -> Self
pub fn with_separator(self) -> Self
Trait Implementations§
Source§impl Clone for NativeMenu
impl Clone for NativeMenu
Source§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) -> Self
fn from(menu: NativeMenu) -> Self
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 Forget for NativeMenu
impl Freeze for NativeMenu
impl Move for NativeMenu
impl RefUnwindSafe for NativeMenu
impl Send for NativeMenuwhere
RawVecInner: Send,
impl Sync for NativeMenuwhere
RawVecInner: Sync,
impl Unpin for NativeMenu
impl UnsafeUnpin for NativeMenuwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<NativeMenuItem>: UnsafeUnpin,
impl UnwindSafe for NativeMenuwhere
RawVecInner: UnwindSafe,
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