pub struct Switches { /* private fields */ }Implementations§
Source§impl Switches
impl Switches
Sourcepub fn builder() -> SwitchesBuilder
pub fn builder() -> SwitchesBuilder
Create an instance of Switches using the builder syntax
Source§impl Switches
impl Switches
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, Switches};
let switches = Switches::builder().build();
assert!(switches.is_empty());
let switches = Switches::builder().maybe_silent("--silent".parse().ok()).build();
assert!(!switches.is_empty());Trait Implementations§
impl Eq for Switches
Source§impl Ord for Switches
impl Ord for Switches
1.21.0 (const: unstable) · 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 PartialOrd for Switches
impl PartialOrd for Switches
impl StructuralPartialEq for Switches
Auto Trait Implementations§
impl Freeze for Switches
impl RefUnwindSafe for Switches
impl Send for Switches
impl Sync for Switches
impl Unpin for Switches
impl UnsafeUnpin for Switches
impl UnwindSafe for Switches
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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