pub struct GptConfig { /* private fields */ }
Expand description
Configuration options to open a GPT disk.
Implementations§
source§impl GptConfig
impl GptConfig
sourcepub fn writable(self, writable: bool) -> Self
pub fn writable(self, writable: bool) -> Self
Whether to open a GPT partition table in writable mode.
sourcepub fn initialized(self, initialized: bool) -> Self
pub fn initialized(self, initialized: bool) -> Self
Whether to assume an initialized GPT disk and read its partition table on open.
sourcepub fn logical_block_size(self, lb_size: LogicalBlockSize) -> Self
pub fn logical_block_size(self, lb_size: LogicalBlockSize) -> Self
Size of logical blocks (sectors) for this disk.
sourcepub fn open(self, diskpath: impl AsRef<Path>) -> Result<GptDisk<'static>>
pub fn open(self, diskpath: impl AsRef<Path>) -> Result<GptDisk<'static>>
Open the GPT disk at the given path and inspect it according to configuration options.
sourcepub fn open_from_device(
self,
device: DiskDeviceObject<'_>,
) -> Result<GptDisk<'_>>
pub fn open_from_device( self, device: DiskDeviceObject<'_>, ) -> Result<GptDisk<'_>>
Open the GPT disk from the given DiskDeviceObject and inspect it according to configuration options.
sourcepub fn create_from_device(
self,
device: DiskDeviceObject<'_>,
guid: Option<Uuid>,
) -> Result<GptDisk<'_>>
pub fn create_from_device( self, device: DiskDeviceObject<'_>, guid: Option<Uuid>, ) -> Result<GptDisk<'_>>
Create a GPTDisk with default headers and an empty partition table. If guid is None then it will generate a new random guid.
Trait Implementations§
impl Eq for GptConfig
impl StructuralPartialEq for GptConfig
Auto Trait Implementations§
impl Freeze for GptConfig
impl RefUnwindSafe for GptConfig
impl Send for GptConfig
impl Sync for GptConfig
impl Unpin for GptConfig
impl UnwindSafe for GptConfig
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