#[repr(transparent)]
pub struct Revision(pub u32);
Expand description
A revision of the UEFI specification.
The major revision number is incremented on major, API-incompatible changes.
The minor revision number is incremented on minor changes,
it is stored as a two-digit binary-coded decimal.
For major revision 2 and later, if the lower minor digit is zero,
the revision is formatted as “major.minor-upper”. Otherwise it’s
formatted as “major.minor-upper.minor-lower”. This format is
described in the “EFI System Table” section of the UEFI
Specification.
Prior to major version 2, the revision is always formatted as
“major.minor”, with minor left-padded with zero if minor-upper is
zero.
Examples:
assert_eq!(Revision::EFI_1_02.to_string(), "1.02");
assert_eq!(Revision::EFI_1_10.to_string(), "1.10");
assert_eq!(Revision::EFI_2_00.to_string(), "2.0");
assert_eq!(Revision::EFI_2_30.to_string(), "2.3");
assert_eq!(Revision::EFI_2_31.to_string(), "2.3.1");
assert_eq!(Revision::EFI_2_100.to_string(), "2.10");
Returns the major revision.
Returns the minor revision.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Returns the “default value” for a type.
Read more
Formats the value using the given formatter.
Read more
Feeds this value into the given [
Hasher
].
Read more
Feeds a slice of this type into the given [
Hasher
].
Read more
This method returns an [
Ordering
] between
self
and
other
.
Read more
Compares and returns the maximum of two values.
Read more
Compares and returns the minimum of two values.
Read more
Restrict a value to a certain interval.
Read more
This method tests for self
and other
values to be equal, and is used
by ==
.
This method tests for !=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
This method returns an ordering between
self
and
other
values if one exists.
Read more
This method tests less than (for
self
and
other
) and is used by the
<
operator.
Read more
This method tests less than or equal to (for
self
and
other
) and is used by the
<=
operator.
Read more
This method tests greater than (for
self
and
other
) and is used by the
>
operator.
Read more
This method tests greater than or equal to (for
self
and
other
) and is used by the
>=
operator.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
[From]<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.