pub enum Architecture {
X86,
X64,
Arm,
Arm64,
Neutral,
}Variants§
Implementations§
Source§impl Architecture
impl Architecture
Sourcepub const fn is_64_bit(self) -> bool
pub const fn is_64_bit(self) -> bool
Returns true if the architecture is a 64-bit architecture.
§Examples
use winget_types::installer::Architecture;
assert!(Architecture::X64.is_64_bit());
assert!(Architecture::Arm64.is_64_bit());
assert!(!Architecture::X86.is_64_bit());
assert!(!Architecture::Arm.is_64_bit());
assert!(!Architecture::Neutral.is_64_bit());Sourcepub const fn is_32_bit(self) -> bool
pub const fn is_32_bit(self) -> bool
Returns true if the architecture is a 32-bit architecture.
§Examples
use winget_types::installer::Architecture;
assert!(Architecture::X86.is_32_bit());
assert!(Architecture::Arm.is_32_bit());
assert!(!Architecture::X64.is_32_bit());
assert!(!Architecture::Arm64.is_32_bit());
assert!(!Architecture::Neutral.is_32_bit());pub fn from_url(url: &str) -> Option<Self>
pub const fn as_str(&self) -> &'static str
Trait Implementations§
Source§impl AsRef<str> for Architecture
impl AsRef<str> for Architecture
Source§impl Clone for Architecture
impl Clone for Architecture
Source§fn clone(&self) -> Architecture
fn clone(&self) -> Architecture
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Architecture
impl Debug for Architecture
Source§impl Default for Architecture
impl Default for Architecture
Source§fn default() -> Architecture
fn default() -> Architecture
Returns the “default value” for a type. Read more
Source§impl Display for Architecture
impl Display for Architecture
Source§impl FromStr for Architecture
impl FromStr for Architecture
Source§impl Hash for Architecture
impl Hash for Architecture
Source§impl Ord for Architecture
impl Ord for Architecture
Source§fn cmp(&self, other: &Architecture) -> Ordering
fn cmp(&self, other: &Architecture) -> 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 Architecture
impl PartialEq for Architecture
Source§impl PartialOrd for Architecture
impl PartialOrd for Architecture
impl Copy for Architecture
impl Eq for Architecture
impl StructuralPartialEq for Architecture
Auto Trait Implementations§
impl Freeze for Architecture
impl RefUnwindSafe for Architecture
impl Send for Architecture
impl Sync for Architecture
impl Unpin for Architecture
impl UnwindSafe for Architecture
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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more