Struct tauri::SystemTrayHandle
source · [−]Expand description
A handle to a system tray. Allows updating the context menu items.
Implementations
sourceimpl<R: Runtime> SystemTrayHandle<R>
impl<R: Runtime> SystemTrayHandle<R>
sourcepub fn get_item(&self, id: MenuIdRef<'_>) -> SystemTrayMenuItemHandle<R>
pub fn get_item(&self, id: MenuIdRef<'_>) -> SystemTrayMenuItemHandle<R>
Gets a handle to the menu item that has the specified id
.
sourcepub fn set_icon(&self, icon: TrayIcon) -> Result<()>
pub fn set_icon(&self, icon: TrayIcon) -> Result<()>
Updates the tray icon. Must be a TrayIcon::File
on Linux and a TrayIcon::Raw
on Windows and macOS.
Updates the tray menu.
Trait Implementations
sourceimpl<R: Runtime> Clone for SystemTrayHandle<R>
impl<R: Runtime> Clone for SystemTrayHandle<R>
Auto Trait Implementations
impl<R> RefUnwindSafe for SystemTrayHandle<R> where
<R as Runtime<EventLoopMessage>>::TrayHandler: RefUnwindSafe,
impl<R> Send for SystemTrayHandle<R>
impl<R> Sync for SystemTrayHandle<R>
impl<R> Unpin for SystemTrayHandle<R> where
<R as Runtime<EventLoopMessage>>::TrayHandler: Unpin,
impl<R> UnwindSafe for SystemTrayHandle<R> where
<R as Runtime<EventLoopMessage>>::TrayHandler: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more