pub struct UnpartitionedSpace { /* private fields */ }Expand description
Describes a unpartitioned space
Implementations§
Source§impl UnpartitionedSpace
impl UnpartitionedSpace
Sourcepub const fn new() -> UnpartitionedSpace
pub const fn new() -> UnpartitionedSpace
Create a new unpartitioned space.
It defaults to no permissions.
Sourcepub const fn from_raw(
permissions_and_location: u32,
permissions_and_flags: u32,
) -> UnpartitionedSpace
pub const fn from_raw( permissions_and_location: u32, permissions_and_flags: u32, ) -> UnpartitionedSpace
Create a new unpartition space from run-time values.
Get these from the ROM function get_partition_table_info with an argument of PT_INFO.
Sourcepub const fn with_permission(self, permission: Permission) -> UnpartitionedSpace
pub const fn with_permission(self, permission: Permission) -> UnpartitionedSpace
Add a permission
Sourcepub const fn with_flag(self, flag: UnpartitionedFlag) -> UnpartitionedSpace
pub const fn with_flag(self, flag: UnpartitionedFlag) -> UnpartitionedSpace
Set a flag
Sourcepub fn get_first_last_sectors(&self) -> (u16, u16)
pub fn get_first_last_sectors(&self) -> (u16, u16)
Get the partition start and end
The offsets are in 4 KiB sectors, inclusive.
Sourcepub fn get_first_last_bytes(&self) -> (u32, u32)
pub fn get_first_last_bytes(&self) -> (u32, u32)
Get the partition start and end
The offsets are in bytes, inclusive.
Sourcepub fn has_permission(&self, permission: Permission) -> bool
pub fn has_permission(&self, permission: Permission) -> bool
Check if it has a permission
Sourcepub fn has_flag(&self, flag: UnpartitionedFlag) -> bool
pub fn has_flag(&self, flag: UnpartitionedFlag) -> bool
Check if the partition has a flag set
Trait Implementations§
Source§impl Clone for UnpartitionedSpace
impl Clone for UnpartitionedSpace
Source§fn clone(&self) -> UnpartitionedSpace
fn clone(&self) -> UnpartitionedSpace
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 UnpartitionedSpace
impl Debug for UnpartitionedSpace
Source§impl Default for UnpartitionedSpace
impl Default for UnpartitionedSpace
Source§fn default() -> UnpartitionedSpace
fn default() -> UnpartitionedSpace
Returns the “default value” for a type. Read more
Source§impl Display for UnpartitionedSpace
impl Display for UnpartitionedSpace
Source§impl PartialEq for UnpartitionedSpace
impl PartialEq for UnpartitionedSpace
impl Eq for UnpartitionedSpace
impl StructuralPartialEq for UnpartitionedSpace
Auto Trait Implementations§
impl Freeze for UnpartitionedSpace
impl RefUnwindSafe for UnpartitionedSpace
impl Send for UnpartitionedSpace
impl Sync for UnpartitionedSpace
impl Unpin for UnpartitionedSpace
impl UnwindSafe for UnpartitionedSpace
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<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
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