pub struct ShellState {Show 38 fields
pub app_id: String,
pub app_name: String,
pub main_label: String,
pub nav: Arc<NavPolicy>,
pub opener: Arc<dyn ExternalOpener>,
pub frameless: bool,
pub close_to_tray: bool,
pub hide_to_background: bool,
pub on_visibility: Option<Arc<dyn Fn(&AppHandle<Wry>, Visibility) + Send + Sync>>,
pub show_policy: ShowPolicy,
pub quit: Arc<QuitGate>,
pub windows: Arc<WindowStateStore>,
pub deep: DeepLinkQueue,
pub schemes: Vec<String>,
pub frontend_ready: AtomicBool,
pub exiting: AtomicBool,
pub traffic: TrafficLights,
pub autostart: AutostartSpec,
pub menu_items: Mutex<HashMap<String, MenuItem<Wry>>>,
pub menu_rows: Mutex<Vec<(String, String)>>,
pub tray: Option<TrayRuntime>,
pub on_menu: Option<Arc<dyn Fn(&AppHandle<Wry>, &str) + Send + Sync>>,
pub hosted: Mutex<Option<Hosted>>,
pub single_instance: Mutex<String>,
pub broker: Arc<PathBroker>,
pub notifications: NotificationState,
pub presence: Arc<PresenceDnd>,
pub idle: Option<IdleHost>,
pub recovery: Option<RecoveryStore>,
pub cache_repair: Mutex<Option<(PathBuf, CacheDirOutcome)>>,
pub stream_scheme: Option<String>,
pub stream_schemes: Vec<String>,
pub site_scheme: Option<String>,
pub site_policy: SitePolicy,
pub modules: ModuleSet,
pub clipboard: ClipboardPolicy,
pub clipboard_options: ClipboardOptions,
pub clipboard_dir: PathBuf,
/* private fields */
}Expand description
Everything the shell shares at runtime (managed Tauri state).
Fields§
§app_id: String§app_name: String§main_label: String§opener: Arc<dyn ExternalOpener>§frameless: bool§close_to_tray: bool§hide_to_background: boolCloseBehavior::HideToBackground: hide and reveal also change the macOS activation policy.
on_visibility: Option<Arc<dyn Fn(&AppHandle<Wry>, Visibility) + Send + Sync>>§show_policy: ShowPolicyThe host’s window-visibility policy, obeyed by lifecycle::reveal_mode.
quit: Arc<QuitGate>The opt-in quit drain (see quit).
windows: Arc<WindowStateStore>§deep: DeepLinkQueue§schemes: Vec<String>§frontend_ready: AtomicBool§exiting: AtomicBool§traffic: TrafficLights§autostart: AutostartSpec§tray: Option<TrayRuntime>§hosted: Mutex<Option<Hosted>>§single_instance: Mutex<String>§broker: Arc<PathBroker>Grants for files the person handed to the app (see broker).
notifications: NotificationState§presence: Arc<PresenceDnd>§idle: Option<IdleHost>§recovery: Option<RecoveryStore>§cache_repair: Mutex<Option<(PathBuf, CacheDirOutcome)>>Result of the startup cache-directory repair (None when disabled).
stream_scheme: Option<String>First scheme registered with ShellBuilder::stream_protocol; the default for rk_shell_stream_grant.
stream_schemes: Vec<String>Every scheme registered with ShellBuilder::stream_protocol.
site_scheme: Option<String>Scheme registered with ShellBuilder::site_protocol.
site_policy: SitePolicy§modules: ModuleSetModules this app installed (see Module).
clipboard: ClipboardPolicy§clipboard_options: ClipboardOptionsRead-side clipboard options (Windows image preference, opt-in unknown formats).
clipboard_dir: PathBufPer-app temp directory for clipboard images.
Auto Trait Implementations§
impl !Freeze for ShellState
impl !RefUnwindSafe for ShellState
impl !UnwindSafe for ShellState
impl Send for ShellState
impl Sync for ShellState
impl Unpin for ShellState
impl UnsafeUnpin for ShellState
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