Struct dioxus_mobile::wry::application::system_tray::SystemTrayBuilder [−]
pub struct SystemTrayBuilder(_);
Expand description
Object that allows you to build SystemTray instance.
Implementations
impl SystemTrayBuilder
impl SystemTrayBuilder
pub fn new(icon: PathBuf, tray_menu: Option<ContextMenu>) -> SystemTrayBuilder
pub fn new(icon: PathBuf, tray_menu: Option<ContextMenu>) -> SystemTrayBuilder
Creates a new SystemTray for platforms where this is appropriate.
Platform-specific
- macOS / Windows:: receive icon as bytes (
Vec<u8>
) - Linux:: receive icon’s path (
PathBuf
)
pub fn build<T>(
self,
window_target: &EventLoopWindowTarget<T>
) -> Result<SystemTray, OsError> where
T: 'static,
pub fn build<T>(
self,
window_target: &EventLoopWindowTarget<T>
) -> Result<SystemTray, OsError> where
T: 'static,
Builds the SystemTray.
Possible causes of error include denied permission, incompatible system, and lack of memory.