pub struct Runtime {Show 16 fields
pub storage: Arc<Storage>,
pub credentials: Arc<OsCredentialStore>,
pub client: Client,
pub widgets_root: PathBuf,
pub catalogue: Mutex<Option<Catalogue>>,
pub catalogue_error: Mutex<Option<String>>,
pub catalogue_checked: Mutex<Option<Instant>>,
pub processes: Arc<Mutex<WidgetProcessManager>>,
pub widget_sessions: Mutex<WidgetSessions>,
pub multi_instance_helper: Option<PathBuf>,
pub cleared_roblox_pids: Mutex<HashSet<u32>>,
pub expired_sessions: Mutex<HashSet<u64>>,
pub join_generation: AtomicU64,
pub cancelled_joins: Mutex<HashSet<u64>>,
pub safe_mode: bool,
pub updated: AtomicBool,
}Expand description
Shared state for commands, managed by Tauri.
Fields§
§storage: Arc<Storage>§credentials: Arc<OsCredentialStore>§client: Client§widgets_root: PathBuf§catalogue: Mutex<Option<Catalogue>>The verified widget catalogue, once loaded.
catalogue_error: Mutex<Option<String>>Why the catalogue couldn’t be loaded, shown on the Widgets screen.
catalogue_checked: Mutex<Option<Instant>>When the catalogue was last requested, successfully or not.
processes: Arc<Mutex<WidgetProcessManager>>§widget_sessions: Mutex<WidgetSessions>Active widget frame sessions.
multi_instance_helper: Option<PathBuf>Bundled helper that closes Roblox’s singleton handles, when installed.
cleared_roblox_pids: Mutex<HashSet<u32>>Roblox processes the helper already handled.
expired_sessions: Mutex<HashSet<u64>>Accounts whose session Roblox no longer accepts, or that have no stored session.
join_generation: AtomicU64Bumped to stop joins in progress. Each join stops once it differs from the value it started with.
cancelled_joins: Mutex<HashSet<u64>>Accounts whose join in progress is skipped. A join clears its own accounts when it starts.
safe_mode: boolWidget modules and frames stay unloaded for this session.
updated: AtomicBoolSet when this launch is the first since an update, until the interface takes it.
Implementations§
Source§impl Runtime
impl Runtime
Sourcepub(crate) fn session_expired(&self, account_id: u64) -> bool
pub(crate) fn session_expired(&self, account_id: u64) -> bool
Whether the account needs to sign in again.
Sourcepub(crate) fn set_session_expired(&self, account_id: u64, expired: bool)
pub(crate) fn set_session_expired(&self, account_id: u64, expired: bool)
Marks an account’s session as expired or valid.
Sourcepub(crate) fn note_session<T>(
&self,
account_id: u64,
result: &Result<T, RobloxError>,
)
pub(crate) fn note_session<T>( &self, account_id: u64, result: &Result<T, RobloxError>, )
Records what a Roblox request made with an account’s session says about it. Success marks it valid and a 401 marks it expired. Other failures say nothing about the session.