InstallerSwitchesBuilder

Struct InstallerSwitchesBuilder 

Source
pub struct InstallerSwitchesBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> InstallerSwitchesBuilder<S>

Source

pub fn build(self) -> InstallerSwitches
where S: IsComplete,

Finish building and return the requested object

Source

pub fn silent( self, value: SilentSwitch, ) -> InstallerSwitchesBuilder<SetSilent<S>>
where S::Silent: IsUnset,

Optional (Some / Option setters). Switches passed to the installer to provide a silent install experience.

These would be used when the command winget install <package> --silent is executed.

Source

pub fn maybe_silent( self, value: Option<SilentSwitch>, ) -> InstallerSwitchesBuilder<SetSilent<S>>
where S::Silent: IsUnset,

Optional (Some / Option setters). Switches passed to the installer to provide a silent install experience.

These would be used when the command winget install <package> --silent is executed.

Source

pub fn silent_with_progress( self, value: SilentWithProgressSwitch, ) -> InstallerSwitchesBuilder<SetSilentWithProgress<S>>
where S::SilentWithProgress: IsUnset,

Optional (Some / Option setters). Switches passed to the installer to provide a silent with progress install experience.

This is intended to allow a progress indication to the user, and the indication may come from an installer UI dialogue, but it must not require user interaction to complete. The Windows Package Manager currently defaults to this install experience.

Source

pub fn maybe_silent_with_progress( self, value: Option<SilentWithProgressSwitch>, ) -> InstallerSwitchesBuilder<SetSilentWithProgress<S>>
where S::SilentWithProgress: IsUnset,

Optional (Some / Option setters). Switches passed to the installer to provide a silent with progress install experience.

This is intended to allow a progress indication to the user, and the indication may come from an installer UI dialogue, but it must not require user interaction to complete. The Windows Package Manager currently defaults to this install experience.

Source

pub fn interactive( self, value: InteractiveSwitch, ) -> InstallerSwitchesBuilder<SetInteractive<S>>
where S::Interactive: IsUnset,

Optional (Some / Option setters). Switches passed to the installer to provide an interactive install experience.

This is intended to allow a user to interact with the installer. These would be used when the command winget install <package> --interactive is executed.

Source

pub fn maybe_interactive( self, value: Option<InteractiveSwitch>, ) -> InstallerSwitchesBuilder<SetInteractive<S>>
where S::Interactive: IsUnset,

Optional (Some / Option setters). Switches passed to the installer to provide an interactive install experience.

This is intended to allow a user to interact with the installer. These would be used when the command winget install <package> --interactive is executed.

Source

pub fn install_location( self, value: InstallLocationSwitch, ) -> InstallerSwitchesBuilder<SetInstallLocation<S>>
where S::InstallLocation: IsUnset,

Optional (Some / Option setters). The path to install the package if the installer supports installing the package in a user configurable location.

The <INSTALLPATH> token can be included in the switch value so the Windows Package Manager will replace the token with user provided path.

Source

pub fn maybe_install_location( self, value: Option<InstallLocationSwitch>, ) -> InstallerSwitchesBuilder<SetInstallLocation<S>>
where S::InstallLocation: IsUnset,

Optional (Some / Option setters). The path to install the package if the installer supports installing the package in a user configurable location.

The <INSTALLPATH> token can be included in the switch value so the Windows Package Manager will replace the token with user provided path.

Source

pub fn log(self, value: LogSwitch) -> InstallerSwitchesBuilder<SetLog<S>>
where S::Log: IsUnset,

Optional (Some / Option setters). The path logs will be directed to if the installer supports specifying the log path in a user configurable location.

The <LOGPATH> token can be included in the switch value so the Windows Package Manager will replace the token with user provided path.

Source

pub fn maybe_log( self, value: Option<LogSwitch>, ) -> InstallerSwitchesBuilder<SetLog<S>>
where S::Log: IsUnset,

Optional (Some / Option setters). The path logs will be directed to if the installer supports specifying the log path in a user configurable location.

The <LOGPATH> token can be included in the switch value so the Windows Package Manager will replace the token with user provided path.

Source

pub fn upgrade( self, value: UpgradeSwitch, ) -> InstallerSwitchesBuilder<SetUpgrade<S>>
where S::Upgrade: IsUnset,

Optional (Some / Option setters). The switches to be passed to the installer during an upgrade. This will happen only if the upgrade behavior is “install”.

Source

pub fn maybe_upgrade( self, value: Option<UpgradeSwitch>, ) -> InstallerSwitchesBuilder<SetUpgrade<S>>
where S::Upgrade: IsUnset,

Optional (Some / Option setters). The switches to be passed to the installer during an upgrade. This will happen only if the upgrade behavior is “install”.

Source

pub fn custom( self, value: CustomSwitch, ) -> InstallerSwitchesBuilder<SetCustom<S>>
where S::Custom: IsUnset,

Optional (Some / Option setters). Any switches the Windows Package Manager will pass to the installer in addition to Silent, SilentWithProgress, and Interactive.

Source

pub fn maybe_custom( self, value: Option<CustomSwitch>, ) -> InstallerSwitchesBuilder<SetCustom<S>>
where S::Custom: IsUnset,

Optional (Some / Option setters). Any switches the Windows Package Manager will pass to the installer in addition to Silent, SilentWithProgress, and Interactive.

Source

pub fn repair( self, value: RepairSwitch, ) -> InstallerSwitchesBuilder<SetRepair<S>>
where S::Repair: IsUnset,

Optional (Some / Option setters). The switches to be passed during the repair of an existing installation.

This will be passed to the installer, ModifyPath ARP command, or Uninstaller ARP command depending on the RepairBehavior specified in the manifest.

Source

pub fn maybe_repair( self, value: Option<RepairSwitch>, ) -> InstallerSwitchesBuilder<SetRepair<S>>
where S::Repair: IsUnset,

Optional (Some / Option setters). The switches to be passed during the repair of an existing installation.

This will be passed to the installer, ModifyPath ARP command, or Uninstaller ARP command depending on the RepairBehavior specified in the manifest.

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

impl<T> ErasedDestructor for T
where T: 'static,