Skip to main content

LocalSettings

Struct LocalSettings 

Source
pub struct LocalSettings {
    pub schema: i64,
    pub backup_remote_offer: Option<BackupRemoteOffer>,
    pub welcome: Option<WelcomeAnswer>,
    pub check_for_updates: Option<bool>,
    pub agent_skill_notice: Option<String>,
    pub online_catalogs: Option<bool>,
    pub online_catalog_hosts: Option<Vec<String>>,
    pub online_catalog_hosts_not_now: Option<Vec<String>>,
    pub skillspector: Option<SkillSpectorSettings>,
    pub loadout_migration: Option<String>,
    pub extra: Table,
}

Fields§

§schema: i64§backup_remote_offer: Option<BackupRemoteOffer>§welcome: Option<WelcomeAnswer>

The first-run welcome was answered (M58). Absent in files written before it existed: the app then decides from the store alone.

§check_for_updates: Option<bool>

Settings > Updates switch (SPEC 16.4). Absent means on; read only by builds that carry the updater.

§agent_skill_notice: Option<String>

The bundled Surjection skill version this machine already reported as “customized, not updated” (#8), so the note is shown once per version.

§online_catalogs: Option<bool>

The “Online catalogs” switch (#26). Absent means off: nothing contacts a catalog until the user turns it on (the first time they open Install > Browse, or surject catalog online on).

§online_catalog_hosts: Option<Vec<String>>

The hosts the user approved for online catalogs: named when they turned them on (M53) or allowed since (M60). A file from before 0.9.0 has no list: its “on” approved catalog::LEGACY_HOSTS.

§online_catalog_hosts_not_now: Option<Vec<String>>

Hosts the user answered “Not now” (M60, #40): not contacted, and Browse does not ask about them again. Absent in older files.

§skillspector: Option<SkillSpectorSettings>

SkillSpector, the optional external scanner (#30). Absent means off.

§loadout_migration: Option<String>

surject migrate loadout finished on this machine (the Surjection version that ran it): the automatic run at start is not repeated.

§extra: Table

Every other key, kept as it is ([snyk_agent_scan] of 0.7.0 among them: scan::external::snyk_leftover removes it).

Implementations§

Source§

impl LocalSettings

Source

pub fn load(fs: &dyn Fs, state_dir: &Path) -> Result<Self, CoreError>

The settings of this machine; defaults when the file is absent.

Source

pub fn save(&self, fs: &dyn Fs, state_dir: &Path) -> Result<(), CoreError>

Trait Implementations§

Source§

impl Clone for LocalSettings

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LocalSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LocalSettings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for LocalSettings

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for LocalSettings

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for LocalSettings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for LocalSettings

Auto Trait Implementations§

§

impl Forget for LocalSettings

§

impl Freeze for LocalSettings
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, PhantomData<String>: Freeze, *const LeafNode<String, Value> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(String, Value)>>: Freeze,

§

impl Move for LocalSettings

§

impl RefUnwindSafe for LocalSettings

§

impl Send for LocalSettings
where RawVecInner: Send, NodeRef<Owned, String, Value, LeafOrInternal>: Send, BoxRaw<(String, Value)>: Send,

§

impl Sync for LocalSettings
where RawVecInner: Sync, NodeRef<Owned, String, Value, LeafOrInternal>: Sync, BoxRaw<(String, Value)>: Sync,

§

impl Unpin for LocalSettings
where *const u8 is !null: Unpin, *const LeafNode<String, Value> is !null: Unpin, Box<(String, Value)>: Unpin,

§

impl UnsafeUnpin for LocalSettings

§

impl UnwindSafe for LocalSettings
where RawVecInner: UnwindSafe, BTreeMap<String, Value>: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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.

Source§

impl<T> NoneValue for T
where T: Default,

Source§

type NoneType = T

Source§

fn null_value() -> T

The none-equivalent value.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

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

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