Struct esp_partition_table::PartitionMd5
source · pub struct PartitionMd5 {
pub data: Md5Data,
}Expand description
ESP Partition MD5
Binary representation:
| Off | Len | Desc |
|---|---|---|
| 0 | 2 | Magic |
| 2 | 14 | Reserved |
| 16 | 16 | MD5 data |
Fields§
§data: Md5DataMD5 checksum data
Implementations§
source§impl PartitionMd5
impl PartitionMd5
sourcepub const RESERVED_SIZE: usize = 14usize
pub const RESERVED_SIZE: usize = 14usize
The size of reserved space between magic bytes and MD5 data
sourcepub const RESERVED_DATA: u8 = 255u8
pub const RESERVED_DATA: u8 = 255u8
The content of reserved space between magic bytes and MD5 data
sourcepub fn from_bytes(data: &PartitionBuffer) -> Result<Self, PartitionError>
pub fn from_bytes(data: &PartitionBuffer) -> Result<Self, PartitionError>
Convert md5 data from binary representation
sourcepub fn to_bytes(&self, data: &mut PartitionBuffer) -> Result<(), PartitionError>
pub fn to_bytes(&self, data: &mut PartitionBuffer) -> Result<(), PartitionError>
Convert md5 data to binary representation
Trait Implementations§
source§impl Clone for PartitionMd5
impl Clone for PartitionMd5
source§fn clone(&self) -> PartitionMd5
fn clone(&self) -> PartitionMd5
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 PartitionMd5
impl Debug for PartitionMd5
source§impl Default for PartitionMd5
impl Default for PartitionMd5
source§fn default() -> PartitionMd5
fn default() -> PartitionMd5
Returns the “default value” for a type. Read more
source§impl From<Digest> for PartitionMd5
impl From<Digest> for PartitionMd5
source§impl From<PartitionMd5> for Md5Data
impl From<PartitionMd5> for Md5Data
source§fn from(md5: PartitionMd5) -> Self
fn from(md5: PartitionMd5) -> Self
Converts to this type from the input type.
source§impl TryFrom<&[u8]> for PartitionMd5
impl TryFrom<&[u8]> for PartitionMd5
source§impl TryFrom<&[u8; 32]> for PartitionMd5
impl TryFrom<&[u8; 32]> for PartitionMd5
§type Error = PartitionError
type Error = PartitionError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl RefUnwindSafe for PartitionMd5
impl Send for PartitionMd5
impl Sync for PartitionMd5
impl Unpin for PartitionMd5
impl UnwindSafe for PartitionMd5
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