Skip to main content

InstallOptions

Struct InstallOptions 

Source
pub struct InstallOptions<'a> {
    pub force: bool,
    pub dry_run: bool,
    pub no_prefix: bool,
    pub no_merge: bool,
    pub ignore_config: IgnoreConfig,
    pub on_file: FileCallback<'a>,
    pub platform: Option<Platform>,
    pub conflict_resolver: Option<&'a dyn ConflictResolver>,
}
Expand description

Options for install/upgrade/remove operations

Fields§

§force: bool

Force overwrite of existing files

§dry_run: bool

Don’t actually make changes, just show what would happen

§no_prefix: bool

Don’t add profile prefix to file names (install/upgrade only)

§no_merge: bool

Don’t merge JSON files (hooks.json, settings.json, etc.)

§ignore_config: IgnoreConfig

File ignore configuration

§on_file: FileCallback<'a>

Callback for file operation progress

§platform: Option<Platform>

Target platform (for filtering unsupported files)

§conflict_resolver: Option<&'a dyn ConflictResolver>

Strategy for resolving file conflicts (None = skip with CONFLICT report)

Implementations§

Source§

impl<'a> InstallOptions<'a>

Source

pub fn new() -> Self

Create new options with defaults

Source

pub fn force(self, force: bool) -> Self

Set force flag

Source

pub fn dry_run(self, dry_run: bool) -> Self

Set dry_run flag

Source

pub fn no_prefix(self, no_prefix: bool) -> Self

Set no_prefix flag

Source

pub fn no_merge(self, no_merge: bool) -> Self

Set no_merge flag

Source

pub fn ignore_config(self, config: IgnoreConfig) -> Self

Set ignore configuration

Source

pub fn on_file(self, callback: FileCallback<'a>) -> Self

Set file callback

Source

pub fn platform(self, platform: Platform) -> Self

Set target platform for filtering

Source

pub fn conflict_resolver(self, resolver: &'a dyn ConflictResolver) -> Self

Set conflict resolver strategy

Source

pub fn should_include_path(&self, path: &Path) -> bool

Check if a path should be included for the target platform

Trait Implementations§

Source§

impl Debug for InstallOptions<'_>

Source§

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

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

impl<'a> Default for InstallOptions<'a>

Source§

fn default() -> InstallOptions<'a>

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

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for InstallOptions<'a>

§

impl<'a> !Send for InstallOptions<'a>

§

impl<'a> !Sync for InstallOptions<'a>

§

impl<'a> !UnwindSafe for InstallOptions<'a>

§

impl<'a> Freeze for InstallOptions<'a>

§

impl<'a> Unpin for InstallOptions<'a>

§

impl<'a> UnsafeUnpin for InstallOptions<'a>

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

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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 = 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.