pub enum PartitionType {
App(AppPartitionType),
Data(DataPartitionType),
Any,
User(u8, u8),
}
Expand description
Partition type and subtype
Variants§
App(AppPartitionType)
Application partition
Data(DataPartitionType)
Data partition
Any
Any type
User(u8, u8)
User-defined type
Implementations§
Source§impl PartitionType
impl PartitionType
Sourcepub fn check_offset(&self, offset: u32) -> Result<(), PartitionError>
pub fn check_offset(&self, offset: u32) -> Result<(), PartitionError>
Check offset for alignment
Sourcepub fn from_bytes(data: &[u8; 2]) -> Result<Self, PartitionError>
pub fn from_bytes(data: &[u8; 2]) -> Result<Self, PartitionError>
Convert type and subtype from binary representation
Trait Implementations§
Source§impl Clone for PartitionType
impl Clone for PartitionType
Source§fn clone(&self) -> PartitionType
fn clone(&self) -> PartitionType
Returns a copy 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 PartitionType
impl Debug for PartitionType
Source§impl Default for PartitionType
impl Default for PartitionType
Source§fn default() -> PartitionType
fn default() -> PartitionType
Returns the “default value” for a type. Read more
Source§impl From<AppPartitionType> for PartitionType
impl From<AppPartitionType> for PartitionType
Source§fn from(subtype: AppPartitionType) -> Self
fn from(subtype: AppPartitionType) -> Self
Converts to this type from the input type.
Source§impl From<DataPartitionType> for PartitionType
impl From<DataPartitionType> for PartitionType
Source§fn from(subtype: DataPartitionType) -> Self
fn from(subtype: DataPartitionType) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PartitionType
impl PartialEq for PartitionType
Source§impl TryFrom<&[u8]> for PartitionType
impl TryFrom<&[u8]> for PartitionType
Source§impl TryFrom<PartitionType> for [u8; 2]
impl TryFrom<PartitionType> for [u8; 2]
Source§type Error = PartitionError
type Error = PartitionError
The type returned in the event of a conversion error.
Source§impl TryFrom<PartitionType> for (u8, u8)
impl TryFrom<PartitionType> for (u8, u8)
Source§type Error = PartitionError
type Error = PartitionError
The type returned in the event of a conversion error.
impl Copy for PartitionType
impl Eq for PartitionType
impl StructuralPartialEq for PartitionType
Auto Trait Implementations§
impl Freeze for PartitionType
impl RefUnwindSafe for PartitionType
impl Send for PartitionType
impl Sync for PartitionType
impl Unpin for PartitionType
impl UnwindSafe for PartitionType
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