#[non_exhaustive]pub struct InstallConfig {
pub access_scope: AccessScope,
pub destination: AppPathPrefix,
pub source_dir: PathBuf,
pub modify_os_search_path: bool,
}Expand description
Parameters that control how the binary is installed.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.access_scope: AccessScopeAccess scope.
destination: AppPathPrefixWhere the files will be installed.
source_dir: PathBufWhere the files are coming from.
modify_os_search_path: boolWhether to modify the search path (PATH).
On Windows, this will modify the environment variable and App Paths in the registry.
On Unix with user scope, this will modify the user’s shell profile
config. The SHELL variable and the existence of
the .bash_profile, .zprofile, or .profile will be used to select
the appropriate file. If the file already contains the path, it will
not be modified.
For system scope, it’s not supported.
Implementations§
Source§impl InstallConfig
impl InstallConfig
Sourcepub fn new_user() -> Result<Self, InstallerError>
pub fn new_user() -> Result<Self, InstallerError>
Create a new config suitable for a User install.
Sourcepub fn new_system() -> Result<Self, InstallerError>
pub fn new_system() -> Result<Self, InstallerError>
Create a new config suitable for a System install.
Trait Implementations§
Source§impl Clone for InstallConfig
impl Clone for InstallConfig
Source§fn clone(&self) -> InstallConfig
fn clone(&self) -> InstallConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InstallConfig
impl Debug for InstallConfig
Source§impl Default for InstallConfig
impl Default for InstallConfig
Source§fn default() -> InstallConfig
fn default() -> InstallConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InstallConfig
impl RefUnwindSafe for InstallConfig
impl Send for InstallConfig
impl Sync for InstallConfig
impl Unpin for InstallConfig
impl UnwindSafe for InstallConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more