Skip to main content

Settings

Struct Settings 

Source
pub struct Settings {
Show 24 fields pub archives: Option<Vec<RepoPath>>, pub cache_timeout: Option<isize>, pub install_path: Option<IPathObject>, pub read_only_installation_paths: Option<Vec<IPathObject>>, pub cfg_version: Option<isize>, pub gui_bounds: Option<Rectangle>, pub gui_maximized: Option<bool>, pub powershell_path: Option<PathBuf>, pub temp_directory: Option<PathBuf>, pub multi_user: Option<bool>, pub projects_default: Option<String>, pub enable_remote_manifests: Option<bool>, pub manifest_repos: Option<Vec<IPathObject>>, pub projects: Option<Vec<IPathObject>>, pub manifests: Option<Vec<IPathObject>>, pub key_store: Option<Vec<IPathObject>>, pub ignore_legacy_platform_repo_deprecation: Option<bool>, pub proxy_settings_to_use: Option<ProxySettingTypes>, pub https_proxy: Option<String>, pub http_proxy: Option<String>, pub no_proxy: Option<String>, pub authentication_config: Option<String>, pub logfile: Option<String>, pub prefer_package_type: Option<InstallationPreference>,
}
Expand description

V3 ISPM configuration, all fields are optional so older configs that we support should also work without an issue

Fields§

§archives: Option<Vec<RepoPath>>

Package repositories that ISPM can install from. Managed by the ispm config package-repos command.

§cache_timeout: Option<isize>

The timeout of the cache

§install_path: Option<IPathObject>

Installation path. Managed by the ispm config install-dir command.

§read_only_installation_paths: Option<Vec<IPathObject>>

Installation paths that are set as read-only. Managed by the ispm config ro-install-paths command.

§cfg_version: Option<isize>

The configuration version number

§gui_bounds: Option<Rectangle>

Last saved bounds of the ISPM GUI

§gui_maximized: Option<bool>

Whether the GUI was maximized

§powershell_path: Option<PathBuf>

The path to the powershell executable

§temp_directory: Option<PathBuf>

The temporary directory used by ISPM. Managed by the ispm config temp-dir command.

§multi_user: Option<bool>

Whether this is a multi-user installation

§projects_default: Option<String>

The default projects

§enable_remote_manifests: Option<bool>

Whether remtoe manifests are enabled

§manifest_repos: Option<Vec<IPathObject>>

Platform repositories that ISPM can install from. Managed by the ispm config platform-repos command.

§projects: Option<Vec<IPathObject>>

A list of registered projects

§manifests: Option<Vec<IPathObject>>

A list of manifests

§key_store: Option<Vec<IPathObject>>

Files that store decryption keys for legacy package installation. Managed by the ispm config decryption-key-files command.

§ignore_legacy_platform_repo_deprecation: Option<bool>

Whether to ignore deprecation warnings for legacy platforms

§proxy_settings_to_use: Option<ProxySettingTypes>

Proxy settings that should be used. Managed by the ispm config proxy (--dont-use|--use-env) command and flags.

§https_proxy: Option<String>

Proxy settings that should be used for HTTPS. Managed by the ispm config proxy --https command and flags.

§http_proxy: Option<String>

Proxy settings that should be used for HTTPS. Managed by the ispm config proxy command.

§no_proxy: Option<String>

URL/IP list (comma-delimited) of resources that should not use a proxy for access.

§authentication_config: Option<String>

The path to the SIMICS authentication file. Not used for public release. Managed by the ispm config auth-file command.

§logfile: Option<String>

The current logfile

§prefer_package_type: Option<InstallationPreference>

The package type that is favored

Implementations§

Source§

impl Settings

Source

pub fn builder() -> SettingsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>

Create a builder for building Settings. On the builder, call .archives(...)(optional), .cache_timeout(...)(optional), .install_path(...)(optional), .read_only_installation_paths(...)(optional), .cfg_version(...)(optional), .gui_bounds(...)(optional), .gui_maximized(...)(optional), .powershell_path(...)(optional), .temp_directory(...)(optional), .multi_user(...)(optional), .projects_default(...)(optional), .enable_remote_manifests(...)(optional), .manifest_repos(...)(optional), .projects(...)(optional), .manifests(...)(optional), .key_store(...)(optional), .ignore_legacy_platform_repo_deprecation(...)(optional), .proxy_settings_to_use(...)(optional), .https_proxy(...)(optional), .http_proxy(...)(optional), .no_proxy(...)(optional), .authentication_config(...)(optional), .logfile(...)(optional), .prefer_package_type(...)(optional) to set the values of the fields. Finally, call .build() to create the instance of Settings.

Source§

impl Settings

Source

pub fn get() -> Result<Self>

Get the current settings from the currently set configuration file

Trait Implementations§

Source§

impl Clone for Settings

Source§

fn clone(&self) -> Settings

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 Settings

Source§

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

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

impl<'de> Deserialize<'de> for Settings

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 Eq for Settings

Source§

impl PartialEq for Settings

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Settings

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> 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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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