pub struct MinimumOSVersion(/* private fields */);Implementations§
Source§impl MinimumOSVersion
impl MinimumOSVersion
Sourcepub const fn new(major: u16, minor: u16, patch: u16, build: u16) -> Self
pub const fn new(major: u16, minor: u16, patch: u16, build: u16) -> Self
Creates a new MinimumOSVersion from a major, minor, patch, and build part.
Sourcepub const fn major(&self) -> u16
pub const fn major(&self) -> u16
Returns the major version.
§Examples
let minimum_os_version = MinimumOSVersion::new(10, 0, 17763, 0);
assert_eq!(minimum_os_version.major(), 10);Sourcepub const fn minor(&self) -> u16
pub const fn minor(&self) -> u16
Returns the minor version.
§Examples
let minimum_os_version = MinimumOSVersion::new(1, 2, 3, 4);
assert_eq!(minimum_os_version.minor(), 2);Trait Implementations§
Source§impl Clone for MinimumOSVersion
impl Clone for MinimumOSVersion
Source§fn clone(&self) -> MinimumOSVersion
fn clone(&self) -> MinimumOSVersion
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 MinimumOSVersion
impl Debug for MinimumOSVersion
Source§impl Default for MinimumOSVersion
impl Default for MinimumOSVersion
Source§fn default() -> MinimumOSVersion
fn default() -> MinimumOSVersion
Returns the “default value” for a type. Read more
Source§impl Display for MinimumOSVersion
impl Display for MinimumOSVersion
Source§impl FromStr for MinimumOSVersion
impl FromStr for MinimumOSVersion
Source§impl Hash for MinimumOSVersion
impl Hash for MinimumOSVersion
Source§impl Ord for MinimumOSVersion
impl Ord for MinimumOSVersion
Source§fn cmp(&self, other: &MinimumOSVersion) -> Ordering
fn cmp(&self, other: &MinimumOSVersion) -> 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 MinimumOSVersion
impl PartialEq for MinimumOSVersion
Source§impl PartialOrd for MinimumOSVersion
impl PartialOrd for MinimumOSVersion
Source§impl TryFrom<CompactString> for MinimumOSVersion
impl TryFrom<CompactString> for MinimumOSVersion
Source§type Error = MinimumOSVersionError
type Error = MinimumOSVersionError
The type returned in the event of a conversion error.
impl Copy for MinimumOSVersion
impl Eq for MinimumOSVersion
impl StructuralPartialEq for MinimumOSVersion
Auto Trait Implementations§
impl Freeze for MinimumOSVersion
impl RefUnwindSafe for MinimumOSVersion
impl Send for MinimumOSVersion
impl Sync for MinimumOSVersion
impl Unpin for MinimumOSVersion
impl UnwindSafe for MinimumOSVersion
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