Struct tauri::window::MenuHandle
source · pub struct MenuHandle<R: Runtime = Wry> { /* private fields */ }
Expand description
A handle to a system tray. Allows updating the context menu items.
Implementations§
source§impl<R: Runtime> MenuHandle<R>
impl<R: Runtime> MenuHandle<R>
sourcepub fn get_item(&self, id: MenuIdRef<'_>) -> MenuItemHandle<R>
pub fn get_item(&self, id: MenuIdRef<'_>) -> MenuItemHandle<R>
Gets a handle to the menu item that has the specified id
.
sourcepub fn try_get_item(&self, id: MenuIdRef<'_>) -> Option<MenuItemHandle<R>>
pub fn try_get_item(&self, id: MenuIdRef<'_>) -> Option<MenuItemHandle<R>>
Attempts to get a handle to the menu item that has the specified id
, return an error if id
is not found.
sourcepub fn is_visible(&self) -> Result<bool>
pub fn is_visible(&self) -> Result<bool>
Whether the menu is visible or not.
Trait Implementations§
source§impl<R: Runtime> Clone for MenuHandle<R>
impl<R: Runtime> Clone for MenuHandle<R>
Auto Trait Implementations§
impl<R> Freeze for MenuHandle<R>
impl<R> RefUnwindSafe for MenuHandle<R>
impl<R> Send for MenuHandle<R>
impl<R> Sync for MenuHandle<R>
impl<R> Unpin for MenuHandle<R>
impl<R> UnwindSafe for MenuHandle<R>
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