pub struct Context<A: Assets> { /* private fields */ }
Expand description
User supplied data required inside of a Tauri application.
Stability
This is the output of the generate_context
macro, and is not considered part of the stable API.
Unless you know what you are doing and are prepared for this type to have breaking changes, do not create it yourself.
Implementations§
source§impl<A: Assets> Context<A>
impl<A: Assets> Context<A>
sourcepub fn config_mut(&mut self) -> &mut Config
pub fn config_mut(&mut self) -> &mut Config
A mutable reference to the config the application was prepared with.
sourcepub fn assets_mut(&mut self) -> &mut Arc<A>
pub fn assets_mut(&mut self) -> &mut Arc<A>
A mutable reference to the assets to be served directly by Tauri.
sourcepub fn default_window_icon(&self) -> Option<&Icon>
pub fn default_window_icon(&self) -> Option<&Icon>
The default window icon Tauri should use when creating windows.
sourcepub fn default_window_icon_mut(&mut self) -> &mut Option<Icon>
pub fn default_window_icon_mut(&mut self) -> &mut Option<Icon>
A mutable reference to the default window icon Tauri should use when creating windows.
sourcepub fn system_tray_icon(&self) -> Option<&Icon>
pub fn system_tray_icon(&self) -> Option<&Icon>
The icon to use on the system tray UI.
sourcepub fn system_tray_icon_mut(&mut self) -> &mut Option<Icon>
pub fn system_tray_icon_mut(&mut self) -> &mut Option<Icon>
A mutable reference to the icon to use on the system tray UI.
sourcepub fn package_info(&self) -> &PackageInfo
pub fn package_info(&self) -> &PackageInfo
Package information.
sourcepub fn package_info_mut(&mut self) -> &mut PackageInfo
pub fn package_info_mut(&mut self) -> &mut PackageInfo
A mutable reference to the package information.
sourcepub fn allowed_commands(&self) -> &ShellScopeConfig
pub fn allowed_commands(&self) -> &ShellScopeConfig
The scoped shell commands, where the HashMap
key is the name each configuration.