Skip to main content

Runtime

Struct Runtime 

Source
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: AtomicU64

Bumped 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: bool

Widget modules and frames stay unloaded for this session.

§updated: AtomicBool

Set when this launch is the first since an update, until the interface takes it.

Implementations§

Source§

impl Runtime

Source

pub(crate) fn session_expired(&self, account_id: u64) -> bool

Whether the account needs to sign in again.

Source

pub(crate) fn set_session_expired(&self, account_id: u64, expired: bool)

Marks an account’s session as expired or valid.

Source

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.

Source

pub(crate) fn session(&self, account_id: u64) -> Result<Secret, CredentialError>

Reads an account’s session. A missing session marks the account expired.

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more