Skip to main content

GptHeaderReadExt

Trait GptHeaderReadExt 

Source
pub trait GptHeaderReadExt: Sized {
    // Required methods
    fn read_from<R: Read>(reader: &mut R) -> Result<Self>;
    fn read_from_lba<R: Read + Seek>(
        reader: &mut R,
        lba: u64,
        block_size: u32,
    ) -> Result<Self>;
}
Available on crate feature read only.
Expand description

Extension trait for reading/writing GptHeader from/to I/O sources.

Required Methods§

Source

fn read_from<R: Read>(reader: &mut R) -> Result<Self>

Reads a GPT header from a reader.

The reader should be positioned at the start of the header (typically LBA 1).

§Errors

Returns an error if reading fails or if the signature is invalid.

Source

fn read_from_lba<R: Read + Seek>( reader: &mut R, lba: u64, block_size: u32, ) -> Result<Self>

Reads a GPT header from a specific LBA.

§Errors

Returns an error if seeking/reading fails or if the signature is invalid.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl GptHeaderReadExt for GptHeader

Available on crate feature sync only.