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 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