Skip to main content

ShellState

Struct ShellState 

Source
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§nav: Arc<NavPolicy>§opener: Arc<dyn ExternalOpener>§frameless: bool§close_to_tray: bool§hide_to_background: bool

CloseBehavior::HideToBackground: hide and reveal also change the macOS activation policy.

§on_visibility: Option<Arc<dyn Fn(&AppHandle<Wry>, Visibility) + Send + Sync>>§show_policy: ShowPolicy

The 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§menu_items: Mutex<HashMap<String, MenuItem<Wry>>>§menu_rows: Mutex<Vec<(String, String)>>§tray: Option<TrayRuntime>§on_menu: Option<Arc<dyn Fn(&AppHandle<Wry>, &str) + Send + Sync>>§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: ModuleSet

Modules this app installed (see Module).

§clipboard: ClipboardPolicy§clipboard_options: ClipboardOptions

Read-side clipboard options (Windows image preference, opt-in unknown formats).

§clipboard_dir: PathBuf

Per-app temp directory for clipboard images.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.