Struct tauri::SystemTrayMenuItemHandle
source · pub struct SystemTrayMenuItemHandle<R: Runtime = Wry> { /* private fields */ }
Available on crate feature
system-tray
only.Expand description
A handle to a system tray menu item.
Implementations§
source§impl<R: Runtime> SystemTrayMenuItemHandle<R>
impl<R: Runtime> SystemTrayMenuItemHandle<R>
sourcepub fn set_enabled(&self, enabled: bool) -> Result<()>
pub fn set_enabled(&self, enabled: bool) -> Result<()>
Modifies the enabled state of the menu item.
sourcepub fn set_title<S: Into<String>>(&self, title: S) -> Result<()>
pub fn set_title<S: Into<String>>(&self, title: S) -> Result<()>
Modifies the title (label) of the menu item.
sourcepub fn set_selected(&self, selected: bool) -> Result<()>
pub fn set_selected(&self, selected: bool) -> Result<()>
Modifies the selected state of the menu item.
sourcepub fn set_native_image(&self, image: NativeImage) -> Result<()>
Available on macOS only.
pub fn set_native_image(&self, image: NativeImage) -> Result<()>
Sets the native image for this item.
Trait Implementations§
source§impl<R: Runtime> Clone for SystemTrayMenuItemHandle<R>
impl<R: Runtime> Clone for SystemTrayMenuItemHandle<R>
Auto Trait Implementations§
impl<R> Freeze for SystemTrayMenuItemHandle<R>
impl<R> RefUnwindSafe for SystemTrayMenuItemHandle<R>
impl<R> Send for SystemTrayMenuItemHandle<R>
impl<R> Sync for SystemTrayMenuItemHandle<R>
impl<R> Unpin for SystemTrayMenuItemHandle<R>
impl<R> UnwindSafe for SystemTrayMenuItemHandle<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