pub trait GptDiskWriteExt {
// Required methods
fn write_to<W: Write + Seek>(&self, writer: &mut W) -> Result<()>;
fn write_to_with_mbr<W: Write + Seek>(
&self,
writer: &mut W,
mbr: &MasterBootRecord,
) -> Result<()>;
}Available on crate features
alloc and write only.Expand description
Extension trait for writing GptDisk to I/O sinks.
Required Methods§
Sourcefn write_to<W: Write + Seek>(&self, writer: &mut W) -> Result<()>
fn write_to<W: Write + Seek>(&self, writer: &mut W) -> Result<()>
Writes the complete GPT structure to a writer.
Writes:
- Protective MBR at LBA 0
- Primary GPT header at LBA 1
- Primary partition entry array starting at LBA 2
- Backup partition entry array before backup header
- Backup GPT header at the last LBA
§Arguments
writer- The writer to write to
§Errors
Returns an error if writing fails.
Sourcefn write_to_with_mbr<W: Write + Seek>(
&self,
writer: &mut W,
mbr: &MasterBootRecord,
) -> Result<()>
fn write_to_with_mbr<W: Write + Seek>( &self, writer: &mut W, mbr: &MasterBootRecord, ) -> Result<()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl GptDiskWriteExt for GptDisk
Available on crate feature
sync only.