Skip to main content

GptHeaderWriteExt

Trait GptHeaderWriteExt 

Source
pub trait GptHeaderWriteExt {
    // Required methods
    fn write_to<W: Write>(&self, writer: &mut W) -> Result<()>;
    fn write_to_lba<W: Write + Seek>(
        &self,
        writer: &mut W,
        lba: u64,
        block_size: u32,
    ) -> Result<()>;
}
Available on crate feature write only.
Expand description

Extension trait for writing GptHeader to I/O sinks.

Required Methods§

Source

fn write_to<W: Write>(&self, writer: &mut W) -> Result<()>

Writes this GPT header to a writer.

Only writes the 92-byte header, not padding to sector size.

§Errors

Returns an error if writing fails.

Source

fn write_to_lba<W: Write + Seek>( &self, writer: &mut W, lba: u64, block_size: u32, ) -> Result<()>

Writes this GPT header to a specific LBA, padded to block size.

§Errors

Returns an error if seeking/writing fails.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl GptHeaderWriteExt for GptHeader

Available on crate feature sync only.