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: Icon) -> Result<()>
pub fn set_icon(&self, icon: Icon) -> Result<()>
Updates the tray icon. Must be a Icon::File
on Linux and a Icon::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>::TrayHandler: RefUnwindSafe,
impl<R> Send for SystemTrayHandle<R>
impl<R> Sync for SystemTrayHandle<R>
impl<R> Unpin for SystemTrayHandle<R> where
<R as Runtime>::TrayHandler: Unpin,
impl<R> UnwindSafe for SystemTrayHandle<R> where
<R as Runtime>::TrayHandler: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub 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