Struct gpt_disk_types::GptPartitionAttributes
source · [−]#[repr(transparent)]pub struct GptPartitionAttributes(pub U64Le);Expand description
Partition attribute bits.
Tuple Fields
0: U64LeImplementations
sourceimpl GptPartitionAttributes
impl GptPartitionAttributes
sourcepub const REQUIRED_PARTITION_BIT: u8 = 0u8
pub const REQUIRED_PARTITION_BIT: u8 = 0u8
If set, bit 0 indicates the partition is required for the
platform to function.
sourcepub const NO_BLOCK_IO_PROTOCOL_BIT: u8 = 1u8
pub const NO_BLOCK_IO_PROTOCOL_BIT: u8 = 1u8
If set, bit 1 tells the firmware not to provide
EFI_BLOCK_IO_PROTOCOL for this partition.
sourcepub const LEGACY_BIOS_BOOTABLE_BIT: u8 = 2u8
pub const LEGACY_BIOS_BOOTABLE_BIT: u8 = 2u8
If set, bit 2 indicates to specialized software on legacy BIOS
systems that the partition may be bootable. This bit is ignored
by UEFI boot loaders.
sourcepub fn required_partition(self) -> bool
pub fn required_partition(self) -> bool
Get the REQUIRED_PARTITION_BIT attribute value.
sourcepub fn update_required_partition(&mut self, required: bool)
pub fn update_required_partition(&mut self, required: bool)
Update the REQUIRED_PARTITION_BIT attribute value.
sourcepub fn no_block_io_protocol(self) -> bool
pub fn no_block_io_protocol(self) -> bool
Get the NO_BLOCK_IO_PROTOCOL_BIT attribute value.
sourcepub fn update_no_block_io_protocol(&mut self, no_block_io_protocol: bool)
pub fn update_no_block_io_protocol(&mut self, no_block_io_protocol: bool)
Update the NO_BLOCK_IO_PROTOCOL_BIT attribute value.
sourcepub fn legacy_bios_bootable(self) -> bool
pub fn legacy_bios_bootable(self) -> bool
Get the LEGACY_BIOS_BOOTABLE_BIT attribute value.
sourcepub fn update_legacy_bios_bootable(&mut self, legacy_bios_bootable: bool)
pub fn update_legacy_bios_bootable(&mut self, legacy_bios_bootable: bool)
Update the LEGACY_BIOS_BOOTABLE_BIT attribute value.
sourcepub fn type_specific_attributes(self) -> U16Le
pub fn type_specific_attributes(self) -> U16Le
Bits 48..=63 represented as a U16Le. These bits are
reserved for custom use by the partition type, so their meaning
depends on GptPartitionEntry::partition_type_guid.
sourcepub fn update_type_specific_attributes(&mut self, attrs: U16Le)
pub fn update_type_specific_attributes(&mut self, attrs: U16Le)
Set bits 48..=63. These bits are reserved for custom use by
the partition type, so their meaning depends on
GptPartitionEntry::partition_type_guid.
Trait Implementations
sourceimpl Clone for GptPartitionAttributes
impl Clone for GptPartitionAttributes
sourcefn clone(&self) -> GptPartitionAttributes
fn clone(&self) -> GptPartitionAttributes
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for GptPartitionAttributes
impl Debug for GptPartitionAttributes
sourceimpl Default for GptPartitionAttributes
impl Default for GptPartitionAttributes
sourcefn default() -> GptPartitionAttributes
fn default() -> GptPartitionAttributes
Returns the “default value” for a type. Read more
sourceimpl Display for GptPartitionAttributes
impl Display for GptPartitionAttributes
sourceimpl Hash for GptPartitionAttributes
impl Hash for GptPartitionAttributes
sourceimpl Ord for GptPartitionAttributes
impl Ord for GptPartitionAttributes
sourceimpl PartialEq<GptPartitionAttributes> for GptPartitionAttributes
impl PartialEq<GptPartitionAttributes> for GptPartitionAttributes
sourcefn eq(&self, other: &GptPartitionAttributes) -> bool
fn eq(&self, other: &GptPartitionAttributes) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &GptPartitionAttributes) -> bool
fn ne(&self, other: &GptPartitionAttributes) -> bool
This method tests for !=.
sourceimpl PartialOrd<GptPartitionAttributes> for GptPartitionAttributes
impl PartialOrd<GptPartitionAttributes> for GptPartitionAttributes
sourcefn partial_cmp(&self, other: &GptPartitionAttributes) -> Option<Ordering>
fn partial_cmp(&self, other: &GptPartitionAttributes) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for GptPartitionAttributes
impl Eq for GptPartitionAttributes
impl Pod for GptPartitionAttributes
impl StructuralEq for GptPartitionAttributes
impl StructuralPartialEq for GptPartitionAttributes
Auto Trait Implementations
impl RefUnwindSafe for GptPartitionAttributes
impl Send for GptPartitionAttributes
impl Sync for GptPartitionAttributes
impl Unpin for GptPartitionAttributes
impl UnwindSafe for GptPartitionAttributes
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedBitPattern for T where
T: AnyBitPattern,
impl<T> CheckedBitPattern for T where
T: AnyBitPattern,
type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during is_valid_bit_pattern. Read more
sourcefn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret bits as &Self.