pub struct InstallerSwitches { /* private fields */ }Implementations§
Source§impl InstallerSwitches
impl InstallerSwitches
Sourcepub fn builder() -> InstallerSwitchesBuilder
pub fn builder() -> InstallerSwitchesBuilder
Create an instance of InstallerSwitches using the builder syntax
Source§impl InstallerSwitches
impl InstallerSwitches
Sourcepub const fn silent(&self) -> Option<&SilentSwitch>
pub const fn silent(&self) -> Option<&SilentSwitch>
Returns the silent switch, if any.
Sourcepub const fn silent_with_progress(&self) -> Option<&SilentWithProgressSwitch>
pub const fn silent_with_progress(&self) -> Option<&SilentWithProgressSwitch>
Returns the silent with progress switch, if any.
Sourcepub const fn interactive(&self) -> Option<&InteractiveSwitch>
pub const fn interactive(&self) -> Option<&InteractiveSwitch>
Returns the interactive switch, if any.
Sourcepub const fn upgrade(&self) -> Option<&UpgradeSwitch>
pub const fn upgrade(&self) -> Option<&UpgradeSwitch>
Returns the upgrade switch, if any.
Sourcepub const fn custom(&self) -> Option<&CustomSwitch>
pub const fn custom(&self) -> Option<&CustomSwitch>
Returns the custom switch, if any.
Sourcepub const fn repair(&self) -> Option<&RepairSwitch>
pub const fn repair(&self) -> Option<&RepairSwitch>
Returns the repair switch, if any.
Sourcepub const fn is_empty(&self) -> bool
pub const fn is_empty(&self) -> bool
Returns true if no switches are present.
§Examples
use winget_types::installer::{switches, InstallerSwitches};
let switches = InstallerSwitches::builder().build();
assert!(switches.is_empty());
let switches = InstallerSwitches::builder().maybe_silent("--silent".parse().ok()).build();
assert!(!switches.is_empty());Trait Implementations§
Source§impl Clone for InstallerSwitches
impl Clone for InstallerSwitches
Source§fn clone(&self) -> InstallerSwitches
fn clone(&self) -> InstallerSwitches
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 InstallerSwitches
impl Debug for InstallerSwitches
Source§impl Default for InstallerSwitches
impl Default for InstallerSwitches
Source§impl Hash for InstallerSwitches
impl Hash for InstallerSwitches
Source§impl Ord for InstallerSwitches
impl Ord for InstallerSwitches
Source§fn cmp(&self, other: &InstallerSwitches) -> Ordering
fn cmp(&self, other: &InstallerSwitches) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for InstallerSwitches
impl PartialEq for InstallerSwitches
Source§impl PartialOrd for InstallerSwitches
impl PartialOrd for InstallerSwitches
impl Eq for InstallerSwitches
impl StructuralPartialEq for InstallerSwitches
Auto Trait Implementations§
impl Freeze for InstallerSwitches
impl RefUnwindSafe for InstallerSwitches
impl Send for InstallerSwitches
impl Sync for InstallerSwitches
impl Unpin for InstallerSwitches
impl UnwindSafe for InstallerSwitches
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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