[][src]Struct libcoreinst::blockdev::SavedPartitions

pub struct SavedPartitions { /* fields omitted */ }

Implementations

impl SavedPartitions[src]

pub fn new_from_disk(
    disk: &mut File,
    filters: &[PartitionFilter]
) -> Result<Self>
[src]

Create a SavedPartitions for a block device with a sector size.

pub fn overwrite(&self, disk: &mut File) -> Result<()>[src]

Unconditionally write the saved partitions, and only the saved partitions, to the disk. Write a protective MBR and overwrite any MBR boot code. Updating the kernel partition table is the caller's responsibility.

pub fn merge(
    &self,
    source: &mut impl Read + Seek,
    disk: &mut File
) -> Result<()>
[src]

If any partitions are saved, merge them into the GPT from source, which must be valid, and write a protective MBR with the correct protective partition size. Updating the kernel partition table is the caller's responsibility.

pub fn get_sector_size(&self) -> u64[src]

Get the sector size in use for this partition table.

pub fn get_offset(&self) -> Result<Option<(u64, String)>>[src]

Get the byte offset of the first byte not to be overwritten, if any, plus a description of the partition at that offset.

pub fn is_saved(&self) -> bool[src]

Trait Implementations

impl Debug for SavedPartitions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,